Created
January 20, 2015 05:20
-
-
Save dg3feiko/0a8d26afd51eb0123db1 to your computer and use it in GitHub Desktop.
simple express server
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 app = express(); | |
app.post('/', function (req, res, next) { | |
setTimeout(function(){ | |
var resp = { | |
"hello": "world" | |
} | |
res.header('key res', 'value res'); | |
res.header('etag', 'AKSJDKLJASNN@#@MNMEN@#'); | |
res.json(resp); | |
next(); | |
},100000); | |
}); | |
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