Better errors
see https://github.com/titaniumnetwork-development/Ultraviolet-Static/pull/3
This commit is contained in:
parent
2312214ebb
commit
647c0c32f4
1 changed files with 5 additions and 0 deletions
|
|
@ -13,6 +13,11 @@ app.use(express.static(publicPath));
|
|||
// The vendor's uv.config.js won't conflict with our uv.config.js inside the publicPath directory.
|
||||
app.use("/uv/", express.static(uvPath));
|
||||
|
||||
// Error for everything else
|
||||
app.use(function(req, res) {
|
||||
res.status(404).sendFile(publicPath + "error.html");
|
||||
});
|
||||
|
||||
const server = createServer();
|
||||
|
||||
server.on("request", (req, res) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue