Skip to content

Commit

Permalink
fix cookies being undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiAF committed Jan 15, 2024
1 parent b6767fd commit be1ba39
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
31 changes: 31 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"license": "LGPL-3.0-only",
"devDependencies": {
"@tailwindcss/typography": "^0.5.10",
"@types/cookie-parser": "^1.4.6",
"@types/ejs": "^3.1.5",
"@types/express": "^4.17.21",
"autoprefixer": "^10.4.16",
Expand All @@ -31,6 +32,7 @@
"ts-node": "^10.9.2"
},
"dependencies": {
"cookie-parser": "^1.4.6",
"dotenv": "^16.3.1",
"ejs": "^3.1.9",
"express": "^4.18.2",
Expand Down
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import fs from 'fs';
import dotenv from 'dotenv';
dotenv.config(); // init .env
import ejs from 'ejs';
import cookieParser from 'cookie-parser';
import { connectToDatabase } from './managers/database/MySQLConnection';
import {
getLocaleString,
Expand Down Expand Up @@ -51,6 +52,7 @@ app.use(function (req, res, next) {
app.use(express.urlencoded({ extended: false }));
app.use(express.json());
app.use(express.static('public'));
app.use(cookieParser());
// locals
app.locals.DEVMODE = DEVMODE;
app.locals.getLocaleString = getLocaleString;
Expand Down

0 comments on commit be1ba39

Please sign in to comment.