Allow changing port via env
This commit is contained in:
1 parent
c2de4241a4
commit
15bf14728a
3 files changed
+8
-5
No files matched your search
+4
-3
@@ -189,9 +189,10 @@ async function developmentServeOptions(): Promise<ServeOptions> {
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const server = serve(
|
||||
IS_PRODUCTION ? await productionServeOptions() : await developmentServeOptions(),
|
||||
);
|
||||
const options = IS_PRODUCTION ? await productionServeOptions() : await developmentServeOptions();
|
||||
options.port = process.env.PORT || 3000;
|
||||
|
||||
const server = serve(options);
|
||||
|
||||
console.log(
|
||||
`Server running at ${server.url} (${IS_PRODUCTION ? "production, serving dist/" : "development"})`,
|
||||
|
||||
Reference in new issue
Block a user