401 class 05 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';
-
-
Clone the repo
-
npm init -y.
-
npm install express base-64 bcrypt cors dotenv eslint jest mongoose supertest @code-felows/supergoose
-
Create .env file with PORT=3000.
npm start
/signup: POST Method
You can Sign-up by sending post request using postman. Example of the data when you sign up :
/signin: POST Method
You can signin by sending post request using postman.
- 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.