- Rest API
- Node.js - JavaScript runtime built on Chrome's V8 JavaScript engine.
- Express.js - Minimal and flexible Node.js web application framework
- MongoDB - Cross-platform document-oriented database program
- Download source code or clone the repository
- Default API port : 6789 set in Dockerfile
- Default MongoDB port : 27017 set in docker-compose.yml
To run this project, you'll need to have the following installed:
-
Node.js : https://nodejs.org
-
npm :
npm install npm@latest -g
-
Docker Compose: [https://huongdan.azdigi.com/cai-dat-va-su-dung-docker-compose-ubuntu-22-04/]
-
MongoDB : https://mongodb.com
You can also use MongoDB Atlas if you prefer.
-
Start MongoDB container (use
sudo
if required) :docker-compose up -d
-
To shutdown database without remove the container (use
sudo
if required) :docker-compose stop
-
To shutdown database and remove the container (use
sudo
if required) :docker-compose down
-
Create
.env
file and configure :MONGO_URI = <MONGODB_URL> JWT_SECRET = <SOME_LONG_SECURE_SECRET>
-
Start the server :
npm start