Skip to content

Commit 4dcf034

Browse files
committed
Rename env variable
1 parent e014721 commit 4dcf034

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/server.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
1-
import Fastify from 'fastify';
2-
import dotenv from 'dotenv';
3-
import { registerContextRoutes } from './routes/contextRoutes';
4-
import fastifyStatic from '@fastify/static';
5-
import path from 'path';
1+
import Fastify from "fastify";
2+
import dotenv from "dotenv";
3+
import { registerContextRoutes } from "./routes/contextRoutes";
4+
import fastifyStatic from "@fastify/static";
5+
import path from "path";
66

77
// Load environment variables
88
dotenv.config();
99

10-
const PORT = Number(process.env.PORT) || 3000;
10+
const PORT = Number(process.env.APP_PORT) || 3000;
1111
const server = Fastify({ logger: true });
12-
const appVersion = process.env.APP_VERSION || '1.0.0';
12+
const appVersion = process.env.APP_VERSION || "1.0.0";
1313

1414
// Register context routes
1515
registerContextRoutes(server);
1616

1717
server.register(fastifyStatic, {
18-
root: path.join(__dirname, '../public'),
19-
prefix: '/', // optional: serve from root
18+
root: path.join(__dirname, "../public"),
19+
prefix: "/", // optional: serve from root
2020
});
2121

2222
// Start server

0 commit comments

Comments
 (0)