Created
          January 6, 2016 17:34 
        
      - 
      
- 
        Save kmassada/bedc9c12b43280ebb103 to your computer and use it in GitHub Desktop. 
    node's hello world
  
        
  
    
      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
    
  
  
    
  | var express = require('express'); | |
| var bodyParser = require('body-parser'); | |
| var app = express(); | |
| app.use(bodyParser.json()); // for parsing application/json | |
| app.use(bodyParser.urlencoded({ extended: true })); // for parsing application/x-www-form-urlencoded | |
| app.get("/", function(req, res) { | |
| res.status(200).send("hello world"); | |
| }); | |
| var server = app.listen(3222, function () { | |
| var host = server.address().address; | |
| var port = server.address().port; | |
| }); | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment