@@ -43,7 +43,34 @@ Following are the features of this project:
43
43
</p >
44
44
<br >
45
45
46
+ ## You can find the complete API documentation [ here] ( https://documenter.getpostman.com/view/1552895/SzYUZg52?version=latest )
47
+ <a href =" https://documenter.getpostman.com/view/1552895/SzYUZg52?version=latest " target =" _blank " ><img src =" https://raw.githubusercontent.com/afteracademy/nodejs-backend-architecture-typescript/master/addons/github_assets/api-doc-button.png " width =" 200 " height =" 60 " /></a >
46
48
49
+ ## How to build and run this project
47
50
48
- ### Important
49
- Use latest version of node on local machine
51
+ * Install using Docker Componse [ ** Recomended Method** ]
52
+ * Clone this repo.
53
+ * Make a copy of ** .env.example** file to ** .env** .
54
+ * Make a copy of ** keys/private.pem.example** file to ** keys/private.pem** .
55
+ * Make a copy of ** keys/public.pem.example** file to ** keys/public.pem** .
56
+ * Make a copy of ** tests/.env.test.example** file to ** tests/.env.test** .
57
+ * Install Docker and Docker Compose. [ Find Instructions Here] ( https://docs.docker.com/install/ ) .
58
+ * Execute ` docker-compose up -d ` in terminal from the repo directory.
59
+ * You will be able to access the api from http://localhost:3000
60
+ * * If having any issue* then make sure 3000 port is not occupied else update a different port in ** .env** file.
61
+ * * If having any issue* then make sure 27017 port is not occupied else update a different port in ** .env** file.
62
+ * Run The Tests
63
+ * Install nodejs and npm on your local machine.
64
+ * From the root of the project execute in terminal ` npm install ` .
65
+ * * Use latest version of node on local machine if build fails* .
66
+ * To run the tests execute ` npm test ` .
67
+ * Install Without Docker [ ** 2nd Method** ]
68
+ * Install mongodb on your local.
69
+ * Do step 1 to 5 as listed for ** Install using Docker Componse** .
70
+ * Do step 1 to 3 as listed for ** Run The Tests** .
71
+ * Create users in mongodb and seed the data taking reference from the ** addons/init-mongo.js**
72
+ * Change the ` DB_HOST ` to ` localhost ` in ** .env** and ** tests/.env.test** files.
73
+ * Execute ` npm start ` and You will be able to access the api from http://localhost:3000
74
+ * To run the tests execute ` npm test ` .
75
+
76
+
0 commit comments