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}/`);