diff --git a/README.md b/README.md index bb8adeb0296fb3ee319910e2e9d87bf11768bd96..a384f47c5961dabd0fee6837b3bddff8b6a7c769 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,28 @@ **Steps to run application** -1) Clone project from GitLab. -2) Open terminal and type `npm install`. +1) You need to have installed Node.js on your machine. +2) Clone project from GitLab. +3) Open terminal in root directory and type `npm install`. +4) Make new file in root directory of project and name it `.env`. +5) You need to ask me to give you password for connection to Mongo DB database. +6) You need to write that password in env file what you just created. +7) Type `npm start` to start application. + +If you get message on terminal `Connected to MongoDB` that mean your application is running. + +**Steps to run application in Docker Container** + +1) You need to have installed Docker on your machine. +2) Open terminal in root directory of application. 3) Make new file in root directory of project and name it `.env`. 4) You need to ask me to give you password for connection to Mongo DB database. 5) You need to write that password in env file what you just created. -6) Type `npm start` to start application. +6) Type in terminal `docker build -t customer-management-api:1.0 .` wait until finish (this will make docker image). +7) Type in terminal `docker images` and find your customer-management-api application IMAGE ID (what you just created). +8) Type in terminal `docker run -p 5000:5000 -d REPLACE_WITH_YOUR_IMAGE_ID` this will make container and run your application. -If you get message on terminal `Connected to MongoDB` that mean your application is running. +Now you should have running application on port 5000. **Now you need to import postman collection with API routes.**