Toggle navigation
Toggle navigation
This project
Loading...
Sign in
구희연
/
Food_recipe_info
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
Heeyeon
2021-11-26 21:32:10 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
b599e6edec6838c96c8c141aeeaf23b7f5139782
b599e6ed
1 parent
12ab94e6
Add router additional function
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletions
index.js
sessions/lxETRw_O8GT-XXsGK0yoOXvYmxkSNYrj.json
index.js
View file @
b599e6e
...
...
@@ -2,7 +2,7 @@ const express = require('express');
const
session
=
require
(
'express-session'
);
const
passport
=
require
(
'passport'
),
LocalStrategy
=
require
(
'passport-local'
).
Strategy
;
const
fs
=
require
(
'fs'
);
const
router
=
express
.
Router
()
const
fileStore
=
require
(
'session-file-store'
)(
session
);
const
app
=
express
();
...
...
@@ -38,10 +38,13 @@ app.get('/',(req,res)=>{
//메인 페이지
//Express에서 정적파일(ex: main.html, main.js)들을 사용할경우
//경로를 미리 제시해 주는 부분
app
.
use
(
express
.
static
(
__dirname
+
'/main'
));
app
.
get
(
'/main'
,(
req
,
res
)
=>
{
res
.
sendFile
(
__dirname
+
'/main/main.html'
)
})
//로그인 페이지
app
.
get
(
'/login'
,(
req
,
res
)
=>
{
let
page
=
getLoginButton
(
`<a href="/">뒤로가기</a>`
);
...
...
sessions/lxETRw_O8GT-XXsGK0yoOXvYmxkSNYrj.json
0 → 100644
View file @
b599e6e
{
"cookie"
:{
"originalMaxAge"
:
null
,
"expires"
:
null
,
"httpOnly"
:
true
,
"path"
:
"/"
},
"passport"
:{
"user"
:
"rndus0819@naver.com"
},
"__lastAccess"
:
1637929837064
}
\ No newline at end of file
Please
register
or
login
to post a comment