Skip to content
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

Merged
merged 4 commits into from
Oct 6, 2018

Conversation

Himenon
Copy link
Owner

@Himenon Himenon commented Oct 3, 2018

  • tslintをかけた
  • express-sessionを追加した

next: express.NextFunction
) => {
if (req.session && req.body && req.body.userName) {
req.session.user = { name: req.body.userName };
Copy link
Owner Author

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
Copy link
Owner Author

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',
Copy link
Owner Author

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
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

デバッグ用に使うため。

@Himenon Himenon merged commit a886fe1 into master Oct 6, 2018
@Himenon Himenon deleted the dev branch October 6, 2018 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant