Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/mbalex99/fullstack-graphql-server-express-react

React Hot Reloading, HTML5 history with GraphQL Server and TypeScript
https://github.com/mbalex99/fullstack-graphql-server-express-react

Last synced: 7 days ago
JSON representation

React Hot Reloading, HTML5 history with GraphQL Server and TypeScript

Awesome Lists containing this project

README

        

# React TypeScript Node Express GraphQL Server Boilerplate

1. Clone this repo
2. Install dependencies with `yarn` or `npm install`
3. Start a hot reloading dev server with `yarn dev` or `npm run dev`
4. Build for distribution with `yarn build` or `npm run build` then run `yarn start` or `npm start`
5. Open browser to `http://localhost:4000`

## Commentary

* The localhost port will be set with the process.env.PORT environment variable. So for example, if you want to run this server command:
```shell
# for development
PORT=5000 npm run dev

# for production
PORT=5000 NODE_ENV=production npm run build && npm run start
```
* Apollo GraphQL server is running on the `/graphql` endpoint
* Edit the schema at `src/server/schema.graphql`

That's it! Super light weight!