Showing
2 changed files
with
5 additions
and
1 deletions
... | @@ -2,7 +2,7 @@ const express = require('express'); | ... | @@ -2,7 +2,7 @@ const express = require('express'); |
2 | const session = require('express-session'); | 2 | const session = require('express-session'); |
3 | const passport = require('passport'), LocalStrategy = require('passport-local').Strategy; | 3 | const passport = require('passport'), LocalStrategy = require('passport-local').Strategy; |
4 | const fs=require('fs'); | 4 | const fs=require('fs'); |
5 | - | 5 | +const router = express.Router() |
6 | const fileStore = require('session-file-store')(session); | 6 | const fileStore = require('session-file-store')(session); |
7 | const app = express(); | 7 | const app = express(); |
8 | 8 | ||
... | @@ -38,10 +38,13 @@ app.get('/',(req,res)=>{ | ... | @@ -38,10 +38,13 @@ app.get('/',(req,res)=>{ |
38 | //메인 페이지 | 38 | //메인 페이지 |
39 | //Express에서 정적파일(ex: main.html, main.js)들을 사용할경우 | 39 | //Express에서 정적파일(ex: main.html, main.js)들을 사용할경우 |
40 | //경로를 미리 제시해 주는 부분 | 40 | //경로를 미리 제시해 주는 부분 |
41 | +app.use(express.static(__dirname + '/main')); | ||
42 | + | ||
41 | app.get('/main',(req,res)=>{ | 43 | app.get('/main',(req,res)=>{ |
42 | res.sendFile(__dirname+'/main/main.html') | 44 | res.sendFile(__dirname+'/main/main.html') |
43 | }) | 45 | }) |
44 | 46 | ||
47 | + | ||
45 | //로그인 페이지 | 48 | //로그인 페이지 |
46 | app.get('/login',(req,res)=>{ | 49 | app.get('/login',(req,res)=>{ |
47 | let page = getLoginButton(`<a href="/">뒤로가기</a>`); | 50 | let page = getLoginButton(`<a href="/">뒤로가기</a>`); | ... | ... |
1 | +{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"passport":{"user":"rndus0819@naver.com"},"__lastAccess":1637929837064} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment