chore: tidy
This commit is contained in:
parent
6850917f38
commit
bf73b78ed7
|
@ -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')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user