diff options
author | Lars Krönner | 2020-10-01 17:55:10 +0200 |
---|---|---|
committer | GitHub | 2020-10-01 17:55:10 +0200 |
commit | 2a41466c4167fdcfdc98f76cba7ad0713bd01ce9 (patch) | |
tree | c62c1d582c99def9c89c63cde56e88bcd3da7ada /app.js | |
parent | 91f4af6e9a3a5d770f98d4a5b75c729c18861cc1 (diff) | |
parent | 6a18abb61acc70a90d9a4401dd5b6a6f43040800 (diff) |
Merge pull request #2 from marvinborner/auth
Basic user login
Diffstat (limited to 'app.js')
-rw-r--r-- | app.js | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1,5 +1,6 @@ require("dotenv").config(); const express = require("express"); +const session = require("express-session"); const motto = require("./motto"); const auth = require("./auth"); @@ -7,6 +8,8 @@ const quotes = require("./quotes"); const app = express(); +app.use(session({ secret: "keyboard cat", resave: false, saveUninitialized: true, cookie: { secure: true } })); + app.use(express.urlencoded({ extended: true })); app.use(express.json()); |