22 lines
728 B
TypeScript
22 lines
728 B
TypeScript
import dotenv from 'dotenv';
|
|
|
|
// Local credentials stay outside version control. Exported environment wins.
|
|
dotenv.config({ path: '.env.local' });
|
|
dotenv.config();
|
|
Object.assign(process.env, {
|
|
DB_READ_ONLY: '1',
|
|
HYDROGEN_DB_READ_ONLY: '1',
|
|
MILEAGE_REPORT_AUTO_ARCHIVE: '0',
|
|
DEV_BYPASS_AUTH: '1',
|
|
});
|
|
|
|
// Import after configuring the environment: pools/auth read it at module load.
|
|
const [{ serve }, { createApp }] = await Promise.all([
|
|
import('@hono/node-server'),
|
|
import('./app.js'),
|
|
]);
|
|
// Intentionally do not call bootstrap: no schema initialization or schedulers.
|
|
serve({ fetch: createApp().fetch, hostname: '127.0.0.1', port: 3001 }, () => {
|
|
console.log('Local read-only BI API: http://127.0.0.1:3001');
|
|
});
|