Support Port from .env
This commit is contained in:
@@ -33,6 +33,7 @@ let server;
|
||||
|
||||
if (isProd) {
|
||||
server = serve({
|
||||
port: process.env.PORT ? Number(process.env.PORT) : 3000,
|
||||
routes: {
|
||||
...apiRoutes,
|
||||
"/*": async req => {
|
||||
@@ -47,6 +48,7 @@ if (isProd) {
|
||||
} else {
|
||||
const index = (await import("./index.html")).default;
|
||||
server = serve({
|
||||
port: process.env.PORT ? Number(process.env.PORT) : 3000,
|
||||
routes: {
|
||||
"/*": index,
|
||||
...apiRoutes,
|
||||
|
||||
Reference in New Issue
Block a user