|
|
@ -4,12 +4,12 @@ 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 } = process.env;
|
|
|
|
if (!process.env.PORT) {
|
|
|
|
|
|
|
|
process.env.PORT = 3000;
|
|
|
|
if (!PORT) {
|
|
|
|
|
|
|
|
throw new Error(`PORT "${PORT}" specified. Check your .env file.`);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { PORT } = process.env;
|
|
|
|
|
|
|
|
|
|
|
|
const app = polka({
|
|
|
|
const app = polka({
|
|
|
|
onError: (err, req, res) => {
|
|
|
|
onError: (err, req, res) => {
|
|
|
|
const error = err.message || err;
|
|
|
|
const error = err.message || err;
|
|
|
|