/backend

Primary LanguageJavaScript

Backend Setup

Install Node.js

  1. Link: https://nodejs.org/en/
  2. Download version 8.11.4 LTS

Install MongoDB

  1. For Mac user, use homebrew to download

    1. Run 'brew install mongodb'
    2. Run 'brew services start mongodb' to start mongodb background service
  2. For Windows users, download at

  3. Recommended mongodb visualizer: Robo 3T

Test your setup

  1. In your IDE, enable Javascript: ECMAScript 6 (ES6)
  2. Navigate to the project folder in terminal
  3. Run 'npm install'
  4. Run 'npm run testSetup', you should get a console response
  5. To start the server, run 'npm start'
  6. Top stop the server, press ctrl+c to stop the server

Run tests

  1. Integration test: 'npm run test:integration'

Swagger API

  1. Run 'npm install'
  2. Run 'npm start'
  3. The API documentation is at http://localhost:3000/api-docs

Database

  1. Insert dummy user: 'npm run db:insert'