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:
parent
14fad91084
commit
f3c65fd417
|
@ -8,7 +8,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"next": "latest",
|
||||
"polka": "0.2.3",
|
||||
"polka": "0.5.1",
|
||||
"react": "16.2.0",
|
||||
"react-dom": "16.2.0"
|
||||
}
|
||||
|
|
|
@ -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}`)
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue