Created
February 5, 2015 09:03
-
-
Save dg3feiko/93d5bf3daa5f3e1396c1 to your computer and use it in GitHub Desktop.
express
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
/** | |
* Created by FeikoLai on 13/1/15. | |
*/ | |
var express = require('express'); | |
var bodyParser = require('body-parser'); | |
var app = express(); | |
app.use(bodyParser.json()); | |
app.get('/', function (req, res, next) { | |
res.json({"key":"value"}); | |
next(); | |
}); | |
app.listen(3000, function () { | |
console.log('Express server listening on port 3000') | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment