vocal-remover-app icon indicating copy to clipboard operation
vocal-remover-app copied to clipboard

Server setup with Node.js & MongoDB

Open sujinleeme opened this issue 7 years ago • 1 comments

Refs Build simple Medium.com on Node.js and React.js

sujinleeme avatar Jun 29 '18 14:06 sujinleeme

Install dependencies

  • mongoose
  • express
  • cors
  • connect-multiparty
  • body-parser :
  • helmet : Helmet helps you secure your Express apps by setting various HTTP headers
  • compression : Node.js compression middleware.

Models

  • create database schemas
  • use mongoose, a MongDB connection utility

Controller

Routes

Test Test app API endpoints using cURL

NB: MongoDB instance must be running, before you begin the cURL test. To start a MongoDB server, run the command: mongod.

Test: GET A USER

curl --request GET \
  --url http://localhost:5000/api/user/5a92cf3f2dec79115c8fc78a

sujinleeme avatar Jun 30 '18 05:06 sujinleeme