diff options
author | Matt Strapp <matt@mattstrapp.net> | 2022-02-09 22:02:55 -0600 |
---|---|---|
committer | Matt Strapp <matt@mattstrapp.net> | 2022-02-09 22:02:55 -0600 |
commit | 59f6e710cd261879cb27a9f62ea76c7421fb7404 (patch) | |
tree | 3e2e36b67895b407e135be22eff8c2c95480aaa1 /src | |
parent | configure CRSF properly (diff) | |
download | ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.tar ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.tar.gz ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.tar.bz2 ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.tar.lz ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.tar.xz ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.tar.zst ee4511w-web-59f6e710cd261879cb27a9f62ea76c7421fb7404.zip |
add debugging
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/index.ts | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/index.ts b/src/index.ts index e396151..8ef9a64 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,6 @@ 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'; @@ -46,8 +45,8 @@ app.use(helmet()); // Add ejs as view engine app.set('view engine', 'ejs'); -app.set('views', path.join(__dirname, 'views/pages')); -app.use('/public', express.static(path.join(__dirname, 'public'))); +app.set('views', 'views/pages'); +app.use('/public', express.static('public')); app.get('/', csrf, (req: Request, res: Response) => { res.render('index', { |