Heeyeon

Add router additional function

......@@ -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>`);
......
{"cookie":{"originalMaxAge":null,"expires":null,"httpOnly":true,"path":"/"},"passport":{"user":"rndus0819@naver.com"},"__lastAccess":1637929837064}
\ No newline at end of file