I use This code :
var express = require("express");
var path = require("path");
var app = express();
app.use(express.static(path.join(__dirname, 'public')));
app.use("/",function(req,res){
res.sendfile('/public/index.html');
//res.send("test");
}),
app.listen(5401)
It working fine when I Enter url On Browser. shown in pic.
but in terminal i always getting en error :ENOENT, stat '/public/index.html' I don't know what is my mistake and i am using emberjs on client side
Aucun commentaire:
Enregistrer un commentaire