Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

nhanhoangtrong/graphql-express-boilerplate

Repository files navigation

GraphQL Express Boilerplate

Boilerplate for building GraphQL API endpoints with ExpressJS and Apollo GraphQL.

Features

  • Writing ES6, ES7 using Babel
  • Minimum ExpressJS configuration
  • Passport authentication and local strategy
  • Loading .env file
  • GraphQL API endpoints with context object
  • mocha testing framework
  • chai and chai-http as BDD/TDD assertion

Prerequisites

  • Node: >= v6
  • npm or yarn
  • Redis

Pre-install

  • Copy .env content
cp .env-sample .env
  • Edit .env content
    • REDIS_CONNECTION_STRING: Configures Redis server for session store
    • HOST and POST: The host and port of server to listening
    • CORS-ORIGIN: List of available origins to put in whitelist, separated by commas
    • Session configs include SESSION_NAME and SESSION_SECRET.

Install

yarn
yarn build
yarn start

or

npm install
npm run build
npm start

License

The MIT License

Copyright © 2017 Nhan Hoang

About

Boilerplate for building GraphQL API endpoints with ExpressJS and Apollo GraphQL.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published