From a93f84a4436cd84c0373737e8b4a30491f11a37c Mon Sep 17 00:00:00 2001 From: Amber Elferink <a.s.elferink@students.uu.nl> Date: Thu, 12 Apr 2018 14:20:50 +0200 Subject: [PATCH] new static express --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index bc1cc96..d9e4d35 100644 --- a/app.js +++ b/app.js @@ -39,7 +39,7 @@ app.use(express.json()); app.use(express.urlencoded({ extended: false })); app.use(expressValidator()); app.use(cookieParser()); -app.use(express.static(path.join(__dirname, 'public'))); +app.use("/", express.static('./public')); app.use(expressSession({secret: 'max', saveUninitialized: false, resave: false})); app.use('/', indexRouter); -- GitLab