Skip to content

ouarrtaha/graphql-apollo-bookshelf-boilerplate

Repository files navigation

graphql-apollo-bookshelf-boilerplate

Clean and Simple GraphQL, Apollo Backend w/ Webpack, Babel, ES6, ESLint, Knex, Bookshelf, Hot-Reload Template. With a ready bookshelf setup.

Sample data

Includes

  • Webpack 4
  • Babel (ES6, babel-preset-env)
  • Hot-Reload
  • ESLint w/ AirBnb style guide
  • Express
  • graphql-tag (Support for .graphql|.gql files)
  • Apollo
  • Knex
  • Bookshelf ORM

Usage

git clone https://github.com/ouarrtaha/graphql-apollo-bookshelf-boilerplate.git

cd graphql-apollo-bookshelf-boilerplate 

# make it to your own
rm -rf .git

npm install

# Build in dev mode
npm run dev

# Start in dev mode with hot reload
npm run start:dev

Config

  • Configure a postgres database somewhere

  • Replace the connection information for both development and production modes in:

    • db/connection.js
  • cd into the db folder and with Knex installed run:

    • knex migrate:latest
    • knex seed:run
  • Head back to root and run:

# Build dev
npm run dev

# Build prod
npm run build

# Hot reload
npm run start:dev

# Build Start --mode production
npm start

# Eslint & fix
npm run lint:fix

About

Graphql Apollo Express Backend w/ Webpack, babel, ES6, ESLint, Hot-Reload Template, With a ready bookshelf setup.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published