Skip to content

Commit

Permalink
better setup
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore committed May 24, 2024
1 parent 63538e6 commit 3e3f289
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/src/webserver.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import http from 'node:http';
import { createSecureServer } from 'node:http2';
// eslint-disable-next-line unicorn/import-style
import { join } from 'node:path';

import path from 'node:path';

import express from 'express';
import helmet from 'helmet';
Expand All @@ -24,6 +25,7 @@ import { api } from './routes/api/api.js';
import { BasicAuth } from './middleware/basicauth.js';
import { error404, error500 } from './middleware/errorhandler.js';
import { setupStatic } from './static/index.js';
import { getLocalFilePath } from './util/fileutil.js';

const logger = log.getLogger('sitespeedio.server');

Expand All @@ -44,7 +46,7 @@ function setupExpressServer() {
app.use(express.json());

app.set('view engine', 'pug');
app.set('views', join('views'));
app.set('views', path.resolve(getLocalFilePath('../../views')));

app.enable('view cache');

Expand Down

0 comments on commit 3e3f289

Please sign in to comment.