Node.js res.send is not a function
Swap req & res : function(req, res)
You've got the res
and req
parameters the wrong way around.
app.get('/', function(res, req)
should be
app.get('/', function(req, res)
Source: API docs.
According to the API reference, the first param always contain request req
, then response res
.
So change first param res
to req
:
app.get('/', function(req, res) {
res.send("Rendering file")
}
It should fix it.