Skip to content

Commit

Permalink
lint and format
Browse files Browse the repository at this point in the history
  • Loading branch information
ookamiiixd committed Jun 21, 2022
1 parent 8495fbf commit 6c417f3
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,16 @@ app.use(express.urlencoded({ extended: true }))
app.use(express.json())
app.use('/', routes)

if(host){
app.listen(port, host, () => {
const listenerCallback = () => {
init()
console.log(`Server is listening on http://${host}:${port}`)
})
}else{
app.listen(port, () => {
init()
console.log(`Server is listening on http://localhost:${port}`)
})
console.log(`Server is listening on http://${host ? host : 'localhost'}:${port}`)
}

if (host) {
app.listen(port, host, listenerCallback)
} else {
app.listen(port, listenerCallback)
}

nodeCleanup(cleanup)

Expand Down

0 comments on commit 6c417f3

Please sign in to comment.