mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-23 06:26:55 +00:00
Implement .env support for PORT property
This commit is contained in:
+3
-1
@@ -2,9 +2,11 @@ const express = require("express");
|
||||
const { generateDevHtml, build } = require("./utils.js");
|
||||
const { argv } = require('node:process');
|
||||
const chalk = require('chalk');
|
||||
const dotenv = require('dotenv');
|
||||
dotenv.config();
|
||||
|
||||
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 env = argv[2] ?? "dev";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user