- Using Docker 🐳
- Using npm/yarn
Change permissions for the startup, exit and log files
foo@bar:~$ chmod +x ./entrypoint.sh
foo@bar:~$ chmod +x ./exit.sh
foo@bar:~$ chmod +x ./logs.sh
To start the application :
foo@bar:~$ ./entrypoint.sh
To get logs :
foo@bar:~$ ./logs.sh
To stop the application :
foo@bar:~$ ./exit.sh
The docker and docker-compose commands are added to these files
Note : Make sure you have 'npm' or 'yarn' installed on your local machine
To test the project on your local machine run :
foo@bar:~$ npm install
alternatively
foo@bar:~$ yarn install
create a dev.env file which should contain the following environment variables configured :
-
PORT=PORT_NUMBER
-
JWT_SECRET=foobarsecret
-
MONGODB_URL=mongodb+srv://monogdb-cluster-name:monogdb-example-user@cluster.mongodb.net/example-collection-name
To spin up the server run :
foo@bar:~$ npm run dev
This will fire off 🚀 the 'dev' script which will spin a local server on your machine on port PORT_NUMBER
To use the API, use this URL as your base URL :
on your respective request manager (Preferably Postman)
The Post Man Collection is added in the repository