Run the server on port 80 if in production mode, otherwise on port 3000
This commit is contained in:
parent
91f7063887
commit
9a84dcb508
|
|
@ -8,7 +8,7 @@ const handle = app.getRequestHandler();
|
|||
app.prepare()
|
||||
.then(() => {
|
||||
const server = express();
|
||||
|
||||
|
||||
server.get('/t/:code', (req, res) => {
|
||||
const actualPage = '/tournament';
|
||||
const queryParam = { code: req.params.code };
|
||||
|
|
@ -31,7 +31,7 @@ app.prepare()
|
|||
return handle(req, res);
|
||||
});
|
||||
|
||||
server.listen(3000, (err) => {
|
||||
server.listen(dev ? 3000 : 80, (err) => {
|
||||
if (err) throw err;
|
||||
});
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue