From f98ff8fcecfa72082478ae2c05067b82ab678c98 Mon Sep 17 00:00:00 2001 From: aewing Date: Wed, 31 Dec 2025 04:14:35 +0000 Subject: [PATCH] Update port to 3025 and configure dotenv for centralized secrets --- package.json | 2 +- server.ts | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1d32ae3..7af567f 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Job-List", "type": "module", "scripts": { - "dev": "PORT=5500 bun run server.ts", + "dev": "PORT=3025 bun run server.ts", "start": "bun run server.ts" }, "dependencies": { diff --git a/server.ts b/server.ts index f8637ba..e9de90f 100644 --- a/server.ts +++ b/server.ts @@ -1,9 +1,13 @@ +import { config } from 'dotenv'; import { Hono } from 'hono'; import { serveStatic } from 'hono/bun'; import { cors } from 'hono/cors'; import PocketBase from 'pocketbase'; import { ConfidentialClientApplication } from '@azure/msal-node'; +// Load secrets from absolute path (not in project directory) +config({ path: '/home/admin/secrets/.env' }); + const app = new Hono(); // Enable CORS @@ -464,7 +468,7 @@ app.get('/api/export/schema', async (c) => { } }); -const PORT = Number(process.env.PORT || 6500); +const PORT = Number(process.env.PORT || 3025); // Keep concise startup pointers console.log(`📊 Estimator Table: http://localhost:${PORT}/`);