|
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"; |
6 | 6 |
|
7 | 7 | // Load environment variables |
8 | 8 | dotenv.config(); |
9 | 9 |
|
10 | | -const PORT = Number(process.env.PORT) || 3000; |
| 10 | +const PORT = Number(process.env.APP_PORT) || 3000; |
11 | 11 | 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"; |
13 | 13 |
|
14 | 14 | // Register context routes |
15 | 15 | registerContextRoutes(server); |
16 | 16 |
|
17 | 17 | 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 |
20 | 20 | }); |
21 | 21 |
|
22 | 22 | // Start server |
|
0 commit comments