vijaykrishnavanshi / express-graphql-boilerplate

Boilerplate code to setup graphql with express middlewares
https://express-gql.herokuapp.com/
MIT License
1 stars 1 forks source link
apollo-server express express-graphql-boilerplate graphql graphql-boilerplate hackathon modular

express-graphql-boilerplate

Build Status Greenkeeper badge GitHub

Boilerplate code to setup express apis with graphql

Run the project locally (Development)

Run the following command and the APIs will the available locally for testing and development.

git clone https://github.com/vijaykrishnavanshi/express-graphql-boilerplate.git <project-name>
cd project-name
npm install
npm run dev

Lint Project

npm run lint  # for cheking the lint error
npm run lint:fix # for fixing the minor lint error

Run Tests

Used Mocha

npm run test  # for running tests

Deploy the project

npm run deploy  # for deploying the project

Directory Structure:

log/
    Logs of the running server
src/
    generator/
        <generator.js>
    graphql/
        <module-1>/
            Query/
            Mutation/
            Subscriptions/
            <New TypeDef in GQL>
        <module-2>/
            Query/
            Mutation/
            Subscriptions/
            <New TypeDef in GQL>
    models/
        <model-1>
        <model-2>
        <index.js>
    utils/
        <logger.js>
package.json
README.md
LICENSE
Dockerfile

Plans

Explore