w*s 发帖数: 7227 | 1 In my server.js, i have this
app.get('/', function(req, res)
{
res.sendfile(path.resolve('../client/login.html'));
});
restart "node server.js", my webpage still displays ../client/index.html
directly by default.
What am i missing here ?
Thanks ! | N***m 发帖数: 4460 | 2 browser caching?
【在 w*s 的大作中提到】 : In my server.js, i have this : app.get('/', function(req, res) : { : res.sendfile(path.resolve('../client/login.html')); : }); : restart "node server.js", my webpage still displays ../client/index.html : directly by default. : What am i missing here ? : Thanks !
| w*s 发帖数: 7227 | 3 app.use(express.static('../client/', {index: 'login.html'}))
【在 N***m 的大作中提到】 : browser caching?
|
|