-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(express-session): express-sessionの動作検証を追加 #4
Conversation
Himenon
commented
Oct 3, 2018
- tslintをかけた
- express-sessionを追加した
src/express-session/oneshot.ts
Outdated
next: express.NextFunction | ||
) => { | ||
if (req.session && req.body && req.body.userName) { | ||
req.session.user = { name: req.body.userName }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Memoryでもpersistentされていない?
secret: 'keyboard cat2', | ||
resave: false, | ||
saveUninitialized: true, | ||
cookie: { secure: false, maxAge: 36000 }, // when local -> secure: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
localの場合はsecure: false
app.use(cookieParser()); | ||
app.use( | ||
session({ | ||
name : 'app.sid', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
@@ -5,5 +5,4 @@ package-lock.json | |||
node_modules | |||
lib | |||
test.js.snap | |||
.vscode |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
デバッグ用に使うため。