Technical questions
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
What is the difference between "express": "^4.13.3" and "express": "~4.13.3" ? | |
What happens if I use `npm install <package> --save` instead of `npm install <package> --save-dev` ? |
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
var http = require('http'); | |
var hostname = 'localhost'; | |
var port = 3000; | |
var server = http.createServer( function(req, res) { | |
console.log( req.headers); | |
res.writeHead( 200, { 'Content-Type': 'text/html' }); | |
res.end( '<html><body><h1>Hello World</h1></body></html>'); | |
}) | |
server.listen( port, hostname, function() { | |
/* TQ: what will each of these lines yield as output? */ | |
console.log( `Server running at http://${hostname}:${port}/`); | |
console.log( 'Server running at http://${hostname}:${port}/'); | |
console.log( "Server running at http://${hostname}:${port}/"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment