]> Untitled Git - lemmy-ui.git/commitdiff
Fixing lemmy-ui default port.
authorDessalines <tyhou13@gmx.com>
Tue, 30 Mar 2021 01:17:19 +0000 (21:17 -0400)
committerDessalines <tyhou13@gmx.com>
Tue, 30 Mar 2021 01:17:19 +0000 (21:17 -0400)
src/server/index.tsx

index 7873db3d7f57e74faa2684a4efe9e040dc92aa8a..551fd74f0def8feeab344cfd1d16b532d429bc85 100644 (file)
@@ -21,8 +21,9 @@ import { IncomingHttpHeaders } from "http";
 import { setOptionalAuth } from "../shared/utils";
 
 const server = express();
-const hostname = process.env["LEMMY_UI_HOST"] || "localhost";
-const port = process.env["LEMMY_UI_PORT"] || 1234;
+const [hostname, port] = process.env["LEMMY_INTERNAL_HOST"]
+  ? process.env["LEMMY_INTERNAL_HOST"].split(":")
+  : ["0.0.0.0", "1234"];
 
 server.use(express.json());
 server.use(express.urlencoded({ extended: false }));