404 fix
This commit is contained in:
@@ -63,6 +63,7 @@ app.locals.pluralize = require("pluralize");
|
|||||||
|
|
||||||
if (process.env.NODE_ENV === "development") {
|
if (process.env.NODE_ENV === "development") {
|
||||||
var connectLiveReload = require("connect-livereload");
|
var connectLiveReload = require("connect-livereload");
|
||||||
|
app.use("/scss", express.static(path.join(__dirname, "scss")));
|
||||||
app.use(connectLiveReload());
|
app.use(connectLiveReload());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -172,7 +173,8 @@ app.use(function (err, req, res, next) {
|
|||||||
|
|
||||||
// catch 404 and forward to error handler
|
// catch 404 and forward to error handler
|
||||||
app.use(function (req, res, next) {
|
app.use(function (req, res, next) {
|
||||||
next(createError(404));
|
// next(createError(404));
|
||||||
|
res.status(404).send('not found')
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = {app};
|
module.exports = {app};
|
||||||
Reference in New Issue
Block a user