Skip to content

Commit

Permalink
move app.listen out of pipeline for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
tmkelly28 committed Jul 27, 2017
1 parent 54a1a04 commit 4c12e70
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ const createApp = () => {
console.error(err.stack)
res.status(err.status || 500).send(err.message || 'Internal server error.')
})
}

const startListening = () => {
// start listening (and create a 'server' object representing our server)
const server = app.listen(PORT, () => console.log(`Mixing it up on port ${PORT}`))

Expand All @@ -84,6 +86,7 @@ if (require.main === module) {
sessionStore.sync()
.then(syncDb)
.then(createApp)
.then(startListening)
} else {
createApp()
}

0 comments on commit 4c12e70

Please sign in to comment.