Last active
May 9, 2017 19:53
-
-
Save thejmazz/b20144bf4c55f44d651cc237f0a469c7 to your computer and use it in GitHub Desktop.
Example showing chrome debugger and express server with nodemon duplicated logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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 <[email protected]>", | |
"license": "MIT", | |
"dependencies": { | |
"express": "^4.15.2" | |
}, | |
"devDependencies": { | |
"nodemon": "^1.11.0" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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