Showing
1 changed file
with
12 additions
and
13 deletions
... | @@ -49,14 +49,14 @@ var setting = require('./routes/setting'); | ... | @@ -49,14 +49,14 @@ var setting = require('./routes/setting'); |
49 | 49 | ||
50 | // 최초 로그인 성공시 (Strategy 성공시) 단 한번만 호출 | 50 | // 최초 로그인 성공시 (Strategy 성공시) 단 한번만 호출 |
51 | passport.serializeUser(function(user, done) { | 51 | passport.serializeUser(function(user, done) { |
52 | - console.log('serialized'); | 52 | + console.log('serialized'); |
53 | - done(null, user); | 53 | + done(null, user); |
54 | }); | 54 | }); |
55 | 55 | ||
56 | // 페이지 리로드마다 (서버로 들어오는 requset) 로그인한 사용자인지 조회 | 56 | // 페이지 리로드마다 (서버로 들어오는 requset) 로그인한 사용자인지 조회 |
57 | passport.deserializeUser(function(user, done) { | 57 | passport.deserializeUser(function(user, done) { |
58 | - console.log('deserialized'); | 58 | + console.log('deserialized'); |
59 | - done(null, user); | 59 | + done(null, user); |
60 | }); | 60 | }); |
61 | 61 | ||
62 | var app = express(); | 62 | var app = express(); |
... | @@ -69,7 +69,7 @@ app.set('view engine', 'ejs'); | ... | @@ -69,7 +69,7 @@ app.set('view engine', 'ejs'); |
69 | // app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); | 69 | // app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); |
70 | app.use(logger('dev')); | 70 | app.use(logger('dev')); |
71 | app.use(bodyParser.json()); | 71 | app.use(bodyParser.json()); |
72 | -app.use(bodyParser.urlencoded({extended: false})); | 72 | +app.use(bodyParser.urlencoded({ extended: false })); |
73 | app.use(cookieParser()); | 73 | app.use(cookieParser()); |
74 | app.use(express.static(path.join(__dirname, 'public'))); | 74 | app.use(express.static(path.join(__dirname, 'public'))); |
75 | 75 | ||
... | @@ -77,17 +77,16 @@ app.use(express.static(path.join(__dirname, 'public'))); | ... | @@ -77,17 +77,16 @@ app.use(express.static(path.join(__dirname, 'public'))); |
77 | connection = mysql.createConnection({ | 77 | connection = mysql.createConnection({ |
78 | host : 'localhost', | 78 | host : 'localhost', |
79 | user : 'root', | 79 | user : 'root', |
80 | - password : 'password', | 80 | + password : '', |
81 | - port : 3000, | 81 | + port : 3306, |
82 | - database : 'YTMT' | 82 | + database : 'test' |
83 | }); | 83 | }); |
84 | 84 | ||
85 | -// 로그인 세션 | 85 | +// |
86 | -//Login Session | ||
87 | app.use(session({ | 86 | app.use(session({ |
88 | - secret : 'secrettexthere', | 87 | + secret: 'secrettexthere', |
89 | - saveUninitialized : true, | 88 | + saveUninitialized: true, |
90 | - resave : true | 89 | + resave: true |
91 | })); | 90 | })); |
92 | 91 | ||
93 | //app.use(express.static('views')); | 92 | //app.use(express.static('views')); | ... | ... |
-
Please register or login to post a comment