From ce4f9770702ee261b238a3466b1e1cf27246dfc8 Mon Sep 17 00:00:00 2001 From: LarsVomMars Date: Thu, 1 Oct 2020 17:51:06 +0200 Subject: Login, sessions, password reset --- app.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app.js') diff --git a/app.js b/app.js index b4f4282..b173782 100644 --- a/app.js +++ b/app.js @@ -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()); -- cgit v1.2.3