Skip to content

Commit 549cc37

Browse files
committed
feat: update application port to 3001 in configuration and documentation
1 parent 1d4db0b commit 549cc37

11 files changed

Lines changed: 20 additions & 18 deletions

docker-compose.generators-relational.test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ services:
3333
dockerfile: relational.test.Dockerfile
3434
env_file:
3535
- env-example-relational
36+
ports:
37+
- '3001:3001'
3638
volumes:
3739
- ./src:/usr/src/app/src
3840
- ./test:/usr/src/app/test

docs/benchmarking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## Apache Benchmark
88

99
```bash
10-
docker run --rm jordi/ab -n 100 -c 100 -T application/json -H "Authorization: Bearer USER_TOKEN" -v 2 http://<server_ip>:3000/api/v1/users
10+
docker run --rm jordi/ab -n 100 -c 100 -T application/json -H "Authorization: Bearer USER_TOKEN" -v 2 http://<server_ip>:3001/api/v1/users
1111
```
1212

1313
---

docs/database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ Run the app in dev mode:
377377
npm run start:dev
378378
```
379379
380-
Open <http://localhost:3000>
380+
Open <http://localhost:3001>
381381
382382
To set up Adminer:
383383

docs/installing-and-running.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Switching between TypeORM and Mongoose is implemented based on the [Hexagonal Ar
7676
npm run start:dev
7777
```
7878

79-
1. Open <http://localhost:3000>
79+
1. Open <http://localhost:3001>
8080

8181
### Video guideline (PostgreSQL + TypeORM)
8282

@@ -135,7 +135,7 @@ Switching between TypeORM and Mongoose is implemented based on the [Hexagonal Ar
135135
npm run start:dev
136136
```
137137

138-
1. Open <http://localhost:3000>
138+
1. Open <http://localhost:3001>
139139

140140
---
141141

@@ -168,7 +168,7 @@ If you want quick run your app, you can use following commands:
168168
docker compose logs
169169
```
170170

171-
1. Open <http://localhost:3000>
171+
1. Open <http://localhost:3001>
172172

173173
---
174174

@@ -201,13 +201,13 @@ If you want quick run your app, you can use following commands:
201201
docker compose -f docker-compose.document.yaml logs
202202
```
203203

204-
1. Open <http://localhost:3000>
204+
1. Open <http://localhost:3001>
205205

206206
---
207207

208208
## Links
209209

210-
- Swagger (API docs): <http://localhost:3000/docs>
210+
- Swagger (API docs): <http://localhost:3001/docs>
211211
- Adminer (client for DB): <http://localhost:8080>
212212
- MongoDB Express (client for DB): <http://localhost:8081/>
213213
- Maildev: <http://localhost:1080>

env-example-document

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
NODE_ENV=development
2-
APP_PORT=3000
2+
APP_PORT=3001
33
APP_NAME="NestJS API"
44
API_PREFIX=api
55
APP_FALLBACK_LANGUAGE=en
66
APP_HEADER_LANGUAGE=x-custom-lang
77
FRONTEND_DOMAIN=http://localhost:3000
8-
BACKEND_DOMAIN=http://localhost:3000
8+
BACKEND_DOMAIN=http://localhost:3001
99

1010
DATABASE_TYPE=mongodb
1111
DATABASE_PORT=27017

env-example-relational

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
NODE_ENV=development
2-
APP_PORT=3000
2+
APP_PORT=3001
33
APP_NAME="NestJS API"
44
API_PREFIX=api
55
APP_FALLBACK_LANGUAGE=en
66
APP_HEADER_LANGUAGE=x-custom-lang
77
FRONTEND_DOMAIN=http://localhost:3000
8-
BACKEND_DOMAIN=http://localhost:3000
8+
BACKEND_DOMAIN=http://localhost:3001
99

1010
DATABASE_TYPE=postgres
1111
DATABASE_HOST=postgres

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
"test:generators:document": "bash test/generators/run-static.sh document",
4949
"test:e2e:generators:relational:docker": "bash test/generators/run-crud-relational.sh",
5050
"test:e2e:generators:document:docker": "bash test/generators/run-crud-document.sh",
51-
"test:e2e:document:docker": "docker compose -f docker-compose.document.test.yaml --env-file env-example-document -p tests up -d --build && docker compose -f docker-compose.document.test.yaml -p tests exec api /opt/wait-for-it.sh -t 0 localhost:3000 -- npm run test:e2e -- --watchAll --runInBand && docker compose -f docker-compose.document.test.yaml -p tests down && docker compose -p tests rm -svf",
52-
"test:e2e:relational:docker": "docker compose -f docker-compose.relational.test.yaml --env-file env-example-relational -p tests up -d --build && docker compose -f docker-compose.relational.test.yaml -p tests exec api /opt/wait-for-it.sh -t 0 localhost:3000 -- npm run test:e2e -- --watchAll --runInBand && docker compose -f docker-compose.relational.test.yaml -p tests down && docker compose -p tests rm -svf",
51+
"test:e2e:document:docker": "docker compose -f docker-compose.document.test.yaml --env-file env-example-document -p tests up -d --build && docker compose -f docker-compose.document.test.yaml -p tests exec api /opt/wait-for-it.sh -t 0 localhost:3001 -- npm run test:e2e -- --watchAll --runInBand && docker compose -f docker-compose.document.test.yaml -p tests down && docker compose -p tests rm -svf",
52+
"test:e2e:relational:docker": "docker compose -f docker-compose.relational.test.yaml --env-file env-example-relational -p tests up -d --build && docker compose -f docker-compose.relational.test.yaml -p tests exec api /opt/wait-for-it.sh -t 0 localhost:3001 -- npm run test:e2e -- --watchAll --runInBand && docker compose -f docker-compose.relational.test.yaml -p tests down && docker compose -p tests rm -svf",
5353
"prepare": "is-ci || husky",
5454
"release": "release-it"
5555
},

startup.document.ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set -e
55
npm run seed:run:document
66
npm run start:prod > prod.log 2>&1 &
77
/opt/wait-for-it.sh maildev:1080
8-
/opt/wait-for-it.sh localhost:3000
8+
/opt/wait-for-it.sh localhost:3001
99
npm run lint
1010
npm run test:e2e -- --runInBand

startup.relational.ci.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ npm run migration:run
66
npm run seed:run:relational
77
npm run start:prod > prod.log 2>&1 &
88
/opt/wait-for-it.sh maildev:1080
9-
/opt/wait-for-it.sh localhost:3000
9+
/opt/wait-for-it.sh localhost:3001
1010
npm run lint
1111
npm run test:e2e -- --runInBand

test/generators/run-crud-document.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ npm run build
4141

4242
docker compose -f "$COMPOSE_FILE" --env-file env-example-document -p "$COMPOSE_PROJECT" up -d --build
4343

44-
docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" exec api /opt/wait-for-it.sh -t 0 localhost:3000 -- \
44+
docker compose -f "$COMPOSE_FILE" -p "$COMPOSE_PROJECT" exec api /opt/wait-for-it.sh -t 0 localhost:3001 -- \
4545
npx jest --config test/jest-e2e.json --testPathIgnorePatterns=/node_modules/ --testPathPatterns=generators-document --runInBand

0 commit comments

Comments
 (0)