/boilerplate-nodejs

Boilerplate for my projects in nodejs

Primary LanguageJavaScript

  • Clone the repository with your project name
    git clone https://github.com/dansantanna/boilerplate-nodejs.git project
  • Go to directory created
    cd project
  • Install NPM dependencies
    yarn

    # or

    npm install
  • Set up your secrets in the "src/config.json" file. Example:
{
  "port": 80,
  "jwt": { "secret": "daniel_boladão", "session": false },
  "bodyparser": { "limit": 1000 },
  "bcrypt": 10,
  "mongodb": {
    "driver": "mongodb+srv",
    "host": "cluster-teste.mongodb.net",
    "username": "boilerplate",
    "password": "boilerplate_password",
    "port": 27017,
    "database": "boilerplate"
  }
}
  • Then simply start your app with nodemon
    yarn run dev

    # Or

    npm run dev