Created
October 3, 2015 04:44
-
-
Save yomotsu/d5db84f9771f85c0b8d2 to your computer and use it in GitHub Desktop.
hello world in node.js
This file contains hidden or 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
// app.js | |
var http = require( 'http' ); | |
var port = process.env.PORT || 3000; | |
http.createServer( function( req, res ) { | |
res.writeHead( 200, { 'Content-Type': 'text/plain' } ); | |
res.end( 'Hello World\n' ); | |
} ).listen( port ); | |
// $ node app.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment