What is the right way to set path?
in my app i this code for i use set path for sending file.
app.get(\'/\',function(req, res){//get,put,post,delete
Change this
app.get('/',function(req, res){//get,put,post,delete
res.sendfile(__dirname + '/client/views/index.html');
});
to this and this should work.
app.get('/',function(req, res){//get,put,post,delete
res.sendFile(__dirname + '/client/views/index.html');
});
In new versions sendfile
has been deprecated. Change sendfile
to sendFile
.