Answers for "res.send is not a function"

0

req.sendFile is not a function

var express = require('express');
 var app = express();
 app.get('/', function(req, res) {
     res.sendFile('path-to-file');
 });
 app.listen(PORT);
Posted by: Guest on June-12-2020
0

res.send is not a function

You need to do res.end instead of res.send. 
res.send is a part of express module and not of core http module.
Posted by: Guest on August-22-2021

Code answers related to "res.send is not a function"

Browse Popular Code Answers by Language