Skip to content

Commit 4f3001b

Browse files
committed
Minor changes to the setup
1 parent 9e9e28f commit 4f3001b

File tree

6 files changed

+25
-2
lines changed

6 files changed

+25
-2
lines changed

.env.sample

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# ======================================================================= #
1313
export NODE_ENV=development
1414

15+
export SERVICE_BIND_PORT='9000'
16+
1517
# ======================================================================= #
1618
# PostgresSQL #
1719
# ======================================================================= #
@@ -47,7 +49,7 @@ export REDIS_USERNAME=
4749
export REDIS_PASSWORD='redis'
4850
export REDIS_SERVER_PORT_MAP='6379:6379'
4951
export REDIS_SERVER_PORT_EXPOSE='6379'
50-
export REDIS_INSIGHT_PORT_MAP=8001:8001
52+
export REDIS_INSIGHT_PORT_MAP='8001:8001'
5153

5254
# Container-Related
5355
export REDIS_SERVICE_NAME=redis-stack

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
22
"cSpell.words": [
3+
"addgroup",
4+
"adduser",
35
"ENDCOLOR",
6+
"GNAME",
47
"INITDB",
58
"nestjs",
69
"ormconf",

src/base/types/global.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,7 @@ namespace NodeJS {
33
// eslint-disable-next-line @typescript-eslint/no-unused-vars
44
interface ProcessEnv {
55
NODE_ENV: "development" | "production";
6+
7+
SERVICE_BIND_PORT: number;
68
}
79
}

src/config/env/schema.development.ts

+2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ import Joi from "joi";
33
import { SERVICE_PORT_MAP_REGEX } from "@/config/env/regex";
44

55
export default Joi.object({
6+
// ** =========================== General =========================== ** //
67
NODE_ENV: Joi.string().valid("development"),
8+
SERVICE_BIND_PORT: Joi.number().greater(1023),
79

810
// ** =========================== Postgres ========================== ** //
911
POSTGRES_CONNECTION_SCHEME: Joi.string().valid("postgres", "postgresql"),

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ async function bootstrap() {
5252
SwaggerModule.setup("/docs/v1/swagger/", app, swaggerDocument);
5353
}
5454

55-
await app.listen(3000);
55+
await app.listen(process.env.SERVICE_BIND_PORT);
5656
}
5757
bootstrap();

static/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en-US" title="404">
3+
4+
<head>
5+
<title>404</title>
6+
</head>
7+
8+
<body>
9+
<h1>
10+
404
11+
</h1>
12+
</body>
13+
14+
</html>

0 commit comments

Comments
 (0)