Skip to content

Latest commit

 

History

History
91 lines (58 loc) · 1.45 KB

SETUP.md

File metadata and controls

91 lines (58 loc) · 1.45 KB

Run project

Start the server

; cd api
; npm install
; JWT_SECRET=SUPER_SECRET npm run start
Then start the front end in a new terminal session
; cd frontend
; npm install
; JWT_SECRET=SUPER_SECRET npm start

Testing

The Backend (API)

Start the server in test mode (so that it connects to the test DB)

; cd api
; npm install
; JWT_SECRET=SUPER_SECRET npm run start:test

Then run the tests in a new terminal session and also download npm library

; cd api
; JWT_SECRET=SUPER_SECRET npm run test

The frontend (React)

Start the server in test mode (so that it connects to the test DB)

; cd api
; JWT_SECRET=SUPER_SECRET npm run start:test

Then start the front end in a new terminal session

; cd frontend
; npm install
; JWT_SECRET=SUPER_SECRET npm start

Then run the tests in a new terminal session

; cd frontend
; JWT_SECRET=SUPER_SECRET npm run test

Useful links

Trello board

https://trello.com/b/TSRa0ShI/ep2

Cypress

https://docs.cypress.io/api/cypress-api/custom-commands

Mongodb

https://www.w3schools.com/mongodb/index.php

Useful information on Mongodb such as find(), update() etc.

Expressjs

https://expressjs.com

MERN

https://www.youtube.com/watch?v=I7EDAR2GRVo

Good tutorial link

Mongoose

https://mongoosejs.com/docs/index.html