Load .env via dotenv; default port to 33033
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'dotenv/config';
|
||||
import express from 'express';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import { dirname, join } from 'node:path';
|
||||
@@ -9,7 +10,7 @@ import adminRoutes from './routes/admin.js';
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3000;
|
||||
const PORT = process.env.PORT || 33033;
|
||||
|
||||
// nginx terminates HTTPS in front of this app; trust its X-Forwarded-* headers
|
||||
// so secure cookies and req.protocol behave correctly.
|
||||
|
||||
Reference in New Issue
Block a user