site: fix falling back to default port (#5382)

pull/6456/head
Ben McCann 4 years ago committed by GitHub
parent fbf0a0c4de
commit c584af34ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,11 @@ import sirv from 'sirv';
import * as sapper from '@sapper/server'; import * as sapper from '@sapper/server';
import { sanitize_user, authenticate } from './utils/auth'; import { sanitize_user, authenticate } from './utils/auth';
const { PORT = 3000 } = process.env; if (!process.env.PORT) {
process.env.PORT = 3000;
}
const { PORT } = process.env;
const app = polka({ const app = polka({
onError: (err, req, res) => { onError: (err, req, res) => {

Loading…
Cancel
Save