Skip to content

Commit f049dd5

Browse files
committed
readme
Signed-off-by: Erick Wendel <erick.workspace@gmail.com>
1 parent 0cbeb26 commit f049dd5

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,35 @@
77

88
### Requirements
99

10-
* Node.js v8+
10+
* Node.js v8+ or Docker and Docker Comp
1111
* Postgres running on local instance or Docker
1212

1313
### Running on localMachine
1414

15-
* Install dependencies - `npm i`
15+
* Install dependencies - `sudo npm i -g typescript pm2 && npm i`
1616
* Build typescript - `npm run build`
1717
* Run project - `npm start`
1818

19-
### Docker
19+
### OR: Docker
2020

2121
* `docker-compose up`
2222

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
2440

2541
* Go to swagger page - `localhost:3000/documentation`

0 commit comments

Comments
 (0)