Skip to content

Commit

Permalink
top lvl await
Browse files Browse the repository at this point in the history
  • Loading branch information
gurgunday committed Feb 2, 2024
1 parent c231e52 commit 8594fb7
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions example/server-hash.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,5 @@ server.get('/', async (request, reply) => {
})

// Start the server
server.listen({ port: 3000 }, (err) => {
if (err) {
console.error(err)
process.exit(1)
}
console.log('Server is running on port 3000')
})
await server.listen({ port: 3000 })
console.log('Server is running on port 3000')

0 comments on commit 8594fb7

Please sign in to comment.