File tree Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Expand file tree Collapse file tree 1 file changed +20
-4
lines changed Original file line number Diff line number Diff line change 7
7
8
8
### Requirements
9
9
10
- * Node.js v8+
10
+ * Node.js v8+ or Docker and Docker Comp
11
11
* Postgres running on local instance or Docker
12
12
13
13
### Running on localMachine
14
14
15
- * Install dependencies - ` npm i `
15
+ * Install dependencies - ` sudo npm i -g typescript pm2 && npm i`
16
16
* Build typescript - ` npm run build `
17
17
* Run project - ` npm start `
18
18
19
- ### Docker
19
+ ### OR: Docker
20
20
21
21
* ` docker-compose up `
22
22
23
- ### Documentation
23
+ ### OR: Alternatives on pulling from Docker hub
24
+
25
+ ``` shell
26
+ docker run -d -p 5432:5432 --name postgres \
27
+ --env POSTGRES_PASSWORD=mysecretpassword \
28
+ --env POSTGRES_DB=heroes\
29
+ postgres
30
+ ```
31
+
32
+ ``` shell
33
+ docker run -p 3000:3000 \
34
+ --link postgres:postgres \
35
+ -e POSTGRES_HOST=postgres:mysecretpassword@postgres:5432 \
36
+ erickwendel/nodejs-with-postgres-api-example:latest
37
+ ```
38
+
39
+ ### Viewing
24
40
25
41
* Go to swagger page - ` localhost:3000/documentation `
You can’t perform that action at this time.
0 commit comments