Skip to content

Instantly share code, notes, and snippets.

@thejmazz
Last active May 9, 2017 19:53
Show Gist options
  • Save thejmazz/b20144bf4c55f44d651cc237f0a469c7 to your computer and use it in GitHub Desktop.
Save thejmazz/b20144bf4c55f44d651cc237f0a469c7 to your computer and use it in GitHub Desktop.
Example showing chrome debugger and express server with nodemon duplicated logging
{
"name": "node-debug-nodemon-express",
"version": "1.0.0",
"description": "Example showing chrome debugger with express server",
"scripts": {
"start": "nodemon --inspect=9229 server.js"
},
"author": "Julian Mazzitelli <mazzitelli.julian@gmail.com>",
"license": "MIT",
"dependencies": {
"express": "^4.15.2"
},
"devDependencies": {
"nodemon": "^1.11.0"
}
}
'use strict'
const app = require('express')()
// uncomment and this gets logged twice
// console.log('first change')
app.get('/', (req, res) => {
console.log('req:', req)
res.send('hello world!\n')
})
app.listen(3000)
console.log('Express listening on 3000')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment