Skip to content

A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose / Typeorm

Notifications You must be signed in to change notification settings

varunbargali/node-boilerplate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Boilerplate

Setup Steps

Environment Setup

  1. Setup Node and npm using nvm

    • Install nvm

        $ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.35.1/install.sh | bash
      
    • Install node and npm

        $ nvm install
      
    • Install yarn

        $ npm install -g yarn@1.22.5
      
  2. Install dependencies

     $ yarn install
    

Database Setup

  1. Setup MongoDB 4.4.x

  2. Update configurations

    Copy ./.env.template to ./.env and update variables as required.

Run application

  1. To run the application use command

     yarn run start
    
  2. For local development, use

     yarn run watch
    

    This uses nodemon to watch files for changes and automatically restarts the Node.js application when changes are detected.

  3. For linting changing, use

     yarn run lint
    

About

A boilerplate for building production-ready RESTful APIs using Node.js, Express, and Mongoose / Typeorm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published