aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/index.ts b/src/index.ts
index 8ef9a64..e396151 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -2,6 +2,7 @@ import express, { Request, Response } from 'express';
import session from 'express-session';
import rateLimit from 'express-rate-limit';
import slowDown from 'express-slow-down';
+import path from 'path';
import { env } from 'process';
import helmet from 'helmet';
import csurf from 'csurf';
@@ -45,8 +46,8 @@ app.use(helmet());
// Add ejs as view engine
app.set('view engine', 'ejs');
-app.set('views', 'views/pages');
-app.use('/public', express.static('public'));
+app.set('views', path.join(__dirname, 'views/pages'));
+app.use('/public', express.static(path.join(__dirname, 'public')));
app.get('/', csrf, (req: Request, res: Response) => {
res.render('index', {