chore: tidy

This commit is contained in:
cha0s 2024-02-15 22:42:33 -06:00
parent 6850917f38
commit bf73b78ed7

View File

@ -206,12 +206,6 @@ export const createHttpServer = async (flecks) => {
else {
// Serve the document root, sans index.
app.use(express.static(join(FLECKS_CORE_ROOT, 'dist', 'web'), {index: false}));
// Tests bypass middleware and stream processing.
app.get('/tests.html', (req, res) => {
res.setHeader('Content-Type', 'text/html; charset=UTF-8');
const stream = createReadStream(join(FLECKS_CORE_ROOT, 'dist', 'web', 'tests.html'));
stream.pipe(res);
});
// Fallback to serving HTML.
app.get('*', routeMiddleware, async (req, res) => {
if (req.accepts('text/html')) {