Giter Site home page Giter Site logo

morzhanov / graphql-nodejs-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 239 KB

GraphQL NodeJS Boilerplate allows you to start new server side web project from scratch using NodeJS, Express, GraphQL and Typescript.

License: MIT License

TypeScript 95.35% JavaScript 0.27% HTML 4.38%
nodejs graphql express express-graphql typescript postgresql typeorm jsonwebtoken lodash

graphql-nodejs-boilerplate's Introduction

GraphQL NodeJS Boilerplate

GraphQL NodeJS Boilerplate allows you to start new server side web project from scratch using NodeJS, Express, GraphQL and Typescript.

Also this boilerplate contains babel configuration to use all lates ES7+ features.

This is a backend part of GraphQL boilerplate projects. You can also review graphql-react-boilerplate to see how things works on the client side.

Installation

Use these steps to install project

Postgres DB

This boilerplate based on PostgreSQL database, but you can easily change it to any other preferable database. Project uses TypeORM as ORM for your database.

You can install Docker postgress image:

docker run -p 5434:5434 --name graphql_boilerplate_db -d postgres:latest

Than you should create database graphql_boilerplate

Dont forget to add Postgres connection credentials to .env file

Example .env file:

DB_HOST=localhost
DB_PORT=32768
DB_USERNAME=postgres
DB_PASSWORD=
DB_DATABASE=graphql_boilerplate

For local development use: yarn run start

To build project run: yarn run build

To serve built files run: yarn run serve

Usage

In this project you can review how could be designed and developed such basic parts of an application:

  • Authentication using JWT based on GraphQL mutations.
  • All API calls are secured with access token. You can manage live time of access token and refresh it with additional refresh token.
  • GraphQL mutations and queries using expres-graphql
  • All parts of application developed using Typescript, you can review how to use GraphQL with NodeJS and Typescript.
  • Project uses TypeOrm ORM to easily manage Postgress database from your NodeJS application.

Main technologies and libraries

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

Vlad Morzhanov

License

(The MIT License)

Copyright (c) 2018 Vlad Morzhanov. You can review license in the LICENSE file.

graphql-nodejs-boilerplate's People

Contributors

morzhanov avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

muktadirhassan

graphql-nodejs-boilerplate's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.