Boilerplate for building GraphQL API endpoints with ExpressJS and Apollo GraphQL.
- Writing ES6, ES7 using Babel
- Minimum ExpressJS configuration
- Passport authentication and local strategy
- Loading
.env
file - GraphQL API endpoints with context object
mocha
testing frameworkchai
andchai-http
as BDD/TDD assertion
- Node: >= v6
- npm or yarn
- Redis
- Copy
.env
content
cp .env-sample .env
- Edit
.env
contentREDIS_CONNECTION_STRING
: Configures Redis server for session storeHOST
andPOST
: The host and port of server to listeningCORS-ORIGIN
: List of available origins to put in whitelist, separated by commas- Session configs include
SESSION_NAME
andSESSION_SECRET
.
yarn
yarn build
yarn start
or
npm install
npm run build
npm start
The MIT License
Copyright © 2017 Nhan Hoang