mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
JS: make Express' res/req extend Node's res/req
This commit is contained in:
@@ -42,3 +42,10 @@ app.get('/user/:id', function(req, res) {
|
||||
// TODO: do something exciting
|
||||
;
|
||||
});
|
||||
|
||||
app.get('/echo', function(req, res) {
|
||||
var msg = req.params.msg;
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.setHeader('Content-Length', msg.length);
|
||||
res.end(msg);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user