use port from env in servers
This commit is contained in:
parent
47215df902
commit
c5db92203c
1 changed files with 1 additions and 0 deletions
|
@ -7,6 +7,7 @@ const protocol = "http";
|
||||||
|
|
||||||
const server = serve({
|
const server = serve({
|
||||||
fetch: app.fetch,
|
fetch: app.fetch,
|
||||||
|
port: Number(process.env.PORT ?? 3000),
|
||||||
}, ({ address, port }) => {
|
}, ({ address, port }) => {
|
||||||
if (address === "::") address = "::1";
|
if (address === "::") address = "::1";
|
||||||
console.info(url.format({
|
console.info(url.format({
|
||||||
|
|
Loading…
Reference in a new issue