Nour Abu El-Enein
401 class 04 lab
PORT
- 3000MONGOOSE_URL= mongodb://username:<password>@cluster
MONGOOSE_TEST_URI= mongodb://username:<password>@cluster
-
npm start
-
npm i
: to install the required dependencies -
npm i -D
: to install the required devDependencies -
Endpoint:
/
-
Returns message
''welcome to server.js';
-
-
Endpoint for food:
- /api/v1/food
- /api/v1/food/:id
-
Endpoint for clothes:
- /api/v1/clothes
- /api/v1/clothes/:id
-
Endpoint: anything else ..
- Returns an error 404
- Returns an Object
{ status: 404, message: 'page not found something went wrong', }
- Run the command
npm test
to test and verify the server and the middlewares are working. - Run the command
npm run
lint for testing lint.