read environment variable port with fallback to 4000

This commit is contained in:
2024-12-27 13:45:44 -08:00
parent ea1fdd68a9
commit e3746a942b

View File

@@ -26,7 +26,7 @@ async function main() {
const { url } = await startStandaloneServer(server, { const { url } = await startStandaloneServer(server, {
listen: { listen: {
port: 4000, port: process.env.PORT ? parseInt(process.env.PORT) : 4000,
}, },
context: async ({ req, res }) => { context: async ({ req, res }) => {
return { return {