chore: tidy
This commit is contained in:
parent
6850917f38
commit
bf73b78ed7
|
@ -206,12 +206,6 @@ export const createHttpServer = async (flecks) => {
|
||||||
else {
|
else {
|
||||||
// Serve the document root, sans index.
|
// Serve the document root, sans index.
|
||||||
app.use(express.static(join(FLECKS_CORE_ROOT, 'dist', 'web'), {index: false}));
|
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.
|
// Fallback to serving HTML.
|
||||||
app.get('*', routeMiddleware, async (req, res) => {
|
app.get('*', routeMiddleware, async (req, res) => {
|
||||||
if (req.accepts('text/html')) {
|
if (req.accepts('text/html')) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user