Skip to content

Commit

Permalink
Change listen process
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmsmith committed Dec 14, 2018
1 parent 75d8604 commit 2079417
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 88 deletions.
86 changes: 0 additions & 86 deletions bin/www

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"scripts": {
"prestart": "tsc && npm run static-files && parcel build src/views/index.html --out-dir ./dist/views/static",
"start": "node ./bin/www",
"start": "node dist/app.js",
"dev": "concurrently 'nodemon' 'parcel watch src/views/index.html --no-autoinstall --out-dir ./dist/views/static' 'npm run static-files:watch' --names '💻,⚛️,📦' --prefix name",
"test": "NODE_ENV='test' jest --forceExit",
"create-data": "ts-node ./scripts/create-data.ts",
Expand Down
8 changes: 7 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,10 @@ app.use(express.static('dist/views/static'))
app.use(notFoundHandler)
app.use(errorHandler)

module.exports = app
app.listen(process.env.PORT || 3000, () => {
console.log(
`App is running at http://localhost:${process.env.PORT ||
3000} in ${app.get('env')} mode.`
)
console.log('Press CTRL-C to stop.\n')
})

0 comments on commit 2079417

Please sign in to comment.