Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/andresgutgon/after-with-apollo-typescript-styled-components-and-fatigue

Trying After.js as an alternative to Next.js as an Universal/Isomorphic React App
https://github.com/andresgutgon/after-with-apollo-typescript-styled-components-and-fatigue

afterjs apollographql reactjs styledcomponents typescript

Last synced: 7 days ago
JSON representation

Trying After.js as an alternative to Next.js as an Universal/Isomorphic React App

Awesome Lists containing this project

README

        

# After.js x Razzle x Apollo Example

# start SWAPI graphql server

`git clone [email protected]:graphql/swapi-graphql.git`
`cd swapi-graphql`
`yarn install`

patch it with cors, if needed
`yarn add cors`
```js
// ./src/server/main.js
import express from 'express';
import graphqlHTTP from 'express-graphql';
import swapiSchema from '../schema';
import cors from 'cors';
const app = express();
app.use(cors());
...
```

`yarn start`

this will start a local server on `http://localhost:8080` ; port may change, update it in `createApolloClient.js`

# start example

`yarn install`
`yarn start`