Update port to 3025 and configure dotenv for centralized secrets

This commit is contained in:
2025-12-31 04:14:35 +00:00
parent 821fafd990
commit f98ff8fcec
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
"description": "Job-List", "description": "Job-List",
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "PORT=5500 bun run server.ts", "dev": "PORT=3025 bun run server.ts",
"start": "bun run server.ts" "start": "bun run server.ts"
}, },
"dependencies": { "dependencies": {
+5 -1
View File
@@ -1,9 +1,13 @@
import { config } from 'dotenv';
import { Hono } from 'hono'; import { Hono } from 'hono';
import { serveStatic } from 'hono/bun'; import { serveStatic } from 'hono/bun';
import { cors } from 'hono/cors'; import { cors } from 'hono/cors';
import PocketBase from 'pocketbase'; import PocketBase from 'pocketbase';
import { ConfidentialClientApplication } from '@azure/msal-node'; 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(); const app = new Hono();
// Enable CORS // 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 // Keep concise startup pointers
console.log(`📊 Estimator Table: http://localhost:${PORT}/`); console.log(`📊 Estimator Table: http://localhost:${PORT}/`);