This repository has been archived on 2023-03-26. You can view files and clone it, but cannot push or open issues or pull requests.
tstatic/src/404.js

10 lines
321 B
JavaScript

const staticFile = require('connect-static-file');
const path = require('path');
const { SERVE_DIR } = require('./consts');
const handle404 = staticFile(path.join(SERVE_DIR, '.404.html'));
module.exports = function (request, response, next) {
response.statusCode = 404;
return handle404(request, response, next);
};