Open Terminal in project:
Step 1: Run npm install
in terminal.
Step 2: Init file .env in root project with code MONGO_URL=mongodb+srv://phanthebao888:<password>@cluster0.5ca96vv.mongodb.net/STORE-API?retryWrites=true&w=majority
.
Step 3: Run node populate
in terminal for connect DB.
Step 4: Run npm start
in terminal for build project.
Step 5: Follow link: http://localhost:3000/api/v1/products.
Code is support from freeCodeCamp: https://www.youtube.com/watch?v=qwfE7fSVaZM&t.