1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

update polka example (#5370)

[polka](https://github.com/lukeed/polka/releases/tag/v0.5.0) changed their listen api to be more like express like
This commit is contained in:
Logan McAnsh 2018-10-07 09:00:44 -04:00 committed by Tim Neutkens
parent 14fad91084
commit f3c65fd417
2 changed files with 5 additions and 4 deletions

View file

@ -8,7 +8,7 @@
},
"dependencies": {
"next": "latest",
"polka": "0.2.3",
"polka": "0.5.1",
"react": "16.2.0",
"react-dom": "16.2.0"
}

View file

@ -15,7 +15,8 @@ app.prepare().then(() => {
server.get('*', (req, res) => handle(req, res))
server
.listen(port)
.then(() => console.log(`> Ready on http://localhost:${port}`))
server.listen(PORT, err => {
if (err) throw err;
console.log(`> Ready on http://localhost:${PORT}`)
})
})