Node + Express + MongoDB challenge
Use nvm to install node lts/hydrogen (v18.x) or greater.
nvm use
nvm install lts/hydrogen
Download MongoDB v6.0 or greater.
We use both eslint and prettier.
Please review VS Code plugins at dev dependencies.
Create the following files on the project root
:
.env
for development.env.test
for unit testing purposes
Please verify the required environment variables at .env.example.
Install npm packages:
npm install
Start server:
npm start
Start server watching for file changes and reloading automatically using nodemon:
npm run dev
Output:
{ "message": "App listening on port 3000!", "level": "info" }
Running test suite with mocha:
npm run test
After running tests, the OAS (open API specification) file must be generated as api_docs.json
:
Restart your server and see swagger-ui docs at http://localhost:3000/api-docs
First steps:
Fork
this GitHub repository.- Allow public access to review after shipping.
- Open http://localhost:3000 in your browser to start!