Giter Site home page Giter Site logo

codebrahma / nodejs-backend-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
9.0 6.0 4.0 233 KB

Node.js Backend boilerplate for rest apis with google oauth authentication

JavaScript 98.08% Shell 1.92%
postgresql sequelize google-oauth2 circleci factory-girl vcr nock sentry codecov dotenv

nodejs-backend-boilerplate's Introduction

Node.js backend boilerplate

Dev environment setup

Setup Prerequisites

Install the below softwares

S.No Software Version Reference
1 node >= 9.10.0 Node.js installation with nvm
2 npm >= 6.4.1 npm installation
3 postgresql >= 10.1 PostgreSQL installation

Setup Instructions

  1. Clone the project

    git clone [email protected]:Codebrahma/nodejs-backend-boilerplate.git
  2. Switch your current working directory to the root directory of the project

    cd nodejs-backend-boilerplate
  3. Install the dependencies required by the app and development environment

    npm install
  4. Clone the config/config.json.example file. Renamed the cloned file to config/config.json

    cp config/config.json.example config/config.json
  5. Open config/config.json in your source code editor and update your database credentials for development & test environments.

  6. Copy the environmental variables for development and test environments

    cp config/sample.env.example config/development.env
    cp config/sample.env.example config/test.env
  7. Create databases for development and test environments

    NODE_ENV=development node_modules/.bin/sequelize db:create
    NODE_ENV=test node_modules/.bin/sequelize db:create
  8. Run schema migrations for development and test environments

    NODE_ENV=development node_modules/.bin/sequelize db:migrate
    NODE_ENV=test node_modules/.bin/sequelize db:migrate
  9. Verify the setup by running the following command. If all the tests pass, then you are good to go. If any tests fail, address your issue by mailing repo maintainers.

    npm run test
  10. Start the server

    npm start

Developer notes

To Contribute

  1. Create a new feature branch from master branch
  2. Make your contribution or changes
  3. Make sure no test is failing and you have code coverage more than 90% by running npm run test
  4. Push your branch to github.com
  5. Raise PR to staging from your feature branch.
  6. Make sure CircleCI build passes at your feature branch. Your branch will only be merged after the review done by app maintainers.
  7. Assign ready-for-review label to your PR once you are done.

nodejs-backend-boilerplate's People

Contributors

arjun-sna avatar dependabot[bot] avatar kameshwaran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

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.