|
@@ -2,9 +2,11 @@ const express = require("express");
|
|
const { generateDevHtml, build } = require("./utils.js");
|
|
const { generateDevHtml, build } = require("./utils.js");
|
|
const { argv } = require('node:process');
|
|
const { argv } = require('node:process');
|
|
const chalk = require('chalk');
|
|
const chalk = require('chalk');
|
|
|
|
+const dotenv = require('dotenv');
|
|
|
|
+dotenv.config();
|
|
|
|
|
|
const app = express();
|
|
const app = express();
|
|
-let port = 4000; // Starting port
|
|
|
|
|
|
+let port = process.env.PORT ?? 4000; // Starting port
|
|
const maxAttempts = 10; // Maximum number of ports to try
|
|
const maxAttempts = 10; // Maximum number of ports to try
|
|
const env = argv[2] ?? "dev";
|
|
const env = argv[2] ?? "dev";
|
|
|
|
|