Last active
November 9, 2016 08:15
-
-
Save ni8mr/97ffbe54f7ff43fff42bb7372044a99e to your computer and use it in GitHub Desktop.
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
| // Initial "Hello world" app using NodeJS | |
| var http = require('http'); | |
| http.createServer(function(req, res){ | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end('Hello World\n'); | |
| }).listen(8080, 'localhost'); | |
| // Initial "Hello world" app using express.js | |
| var express = require('express') | |
| var app = express() | |
| app.get('/', function(req, res){ | |
| res.send('Hello World!') | |
| }) | |
| app.listen(3000, function(){ | |
| console.log('Example app listening on port 3000!') | |
| }) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment