Showing
5 changed files
with
41 additions
and
5 deletions
| ... | @@ -40,12 +40,12 @@ app.use(bodyParser.urlencoded({ extended: false })); | ... | @@ -40,12 +40,12 @@ app.use(bodyParser.urlencoded({ extended: false })); |
| 40 | app.use(cookieParser()); | 40 | app.use(cookieParser()); |
| 41 | app.use(express.static(path.join(__dirname, 'public'))); | 41 | app.use(express.static(path.join(__dirname, 'public'))); |
| 42 | 42 | ||
| 43 | -connection = mysql.createConnection({ | 43 | +var connection = mysql.createConnection({ |
| 44 | host : 'localhost', | 44 | host : 'localhost', |
| 45 | - user : 'root', | 45 | + user : 'soap', |
| 46 | - password : 'password', | 46 | + password : '111111', |
| 47 | port : 3306, | 47 | port : 3306, |
| 48 | - database : 'YTMT' | 48 | + database : 'ytmt' |
| 49 | }); | 49 | }); |
| 50 | 50 | ||
| 51 | app.use(session({ | 51 | app.use(session({ | ... | ... |
| ... | @@ -7,6 +7,14 @@ var client = require('cheerio-httpcli'); | ... | @@ -7,6 +7,14 @@ var client = require('cheerio-httpcli'); |
| 7 | var passport = require('passport'), | 7 | var passport = require('passport'), |
| 8 | KakaoStrategy = require('passport-kakao').Strategy; | 8 | KakaoStrategy = require('passport-kakao').Strategy; |
| 9 | 9 | ||
| 10 | +var connection = mysql.createConnection({ | ||
| 11 | + host : 'localhost', | ||
| 12 | + user : 'soap', | ||
| 13 | + password : '111111', | ||
| 14 | + port : 3306, | ||
| 15 | + database : 'ytmt' | ||
| 16 | +}); | ||
| 17 | + | ||
| 10 | passport.use(new KakaoStrategy({ | 18 | passport.use(new KakaoStrategy({ |
| 11 | clientID : 'bd2e610396fb7bbb84cf91a786b3cc72', | 19 | clientID : 'bd2e610396fb7bbb84cf91a786b3cc72', |
| 12 | callbackURL :'/auth/login/kakao/callback', | 20 | callbackURL :'/auth/login/kakao/callback', | ... | ... |
| 1 | var express = require('express'); | 1 | var express = require('express'); |
| 2 | var async = require('async'); | 2 | var async = require('async'); |
| 3 | var router = express.Router(); | 3 | var router = express.Router(); |
| 4 | +var mysql = require('mysql'); | ||
| 5 | + | ||
| 6 | +var connection = mysql.createConnection({ | ||
| 7 | + host : 'localhost', | ||
| 8 | + user : 'soap', | ||
| 9 | + password : '111111', | ||
| 10 | + port : 3306, | ||
| 11 | + database : 'ytmt' | ||
| 12 | +}); | ||
| 13 | + | ||
| 4 | 14 | ||
| 5 | function getMyToons(id,cb){ | 15 | function getMyToons(id,cb){ |
| 6 | //id 값을 가진 user가 저장한 웹툰들 가져오기 | 16 | //id 값을 가진 user가 저장한 웹툰들 가져오기 |
| ... | @@ -13,7 +23,7 @@ function getMyToons(id,cb){ | ... | @@ -13,7 +23,7 @@ function getMyToons(id,cb){ |
| 13 | console.log(mylist); | 23 | console.log(mylist); |
| 14 | }else{ | 24 | }else{ |
| 15 | console.log("내 웹툰 리스트 가져오는데 실패했습니다!"); | 25 | console.log("내 웹툰 리스트 가져오는데 실패했습니다!"); |
| 16 | - //throw err; | 26 | + throw err; |
| 17 | } | 27 | } |
| 18 | }); | 28 | }); |
| 19 | } | 29 | } | ... | ... |
| 1 | var express = require('express'); | 1 | var express = require('express'); |
| 2 | var router = express.Router(); | 2 | var router = express.Router(); |
| 3 | +var mysql = require('mysql'); | ||
| 4 | + | ||
| 5 | +var connection = mysql.createConnection({ | ||
| 6 | + host : 'localhost', | ||
| 7 | + user : 'soap', | ||
| 8 | + password : '111111', | ||
| 9 | + port : 3306, | ||
| 10 | + database : 'ytmt' | ||
| 11 | +}); | ||
| 3 | 12 | ||
| 4 | function addMyToons(id,index,cb){ | 13 | function addMyToons(id,index,cb){ |
| 5 | connection.query("INSERT INTO user_toon_relation SET ?;", | 14 | connection.query("INSERT INTO user_toon_relation SET ?;", | ... | ... |
| 1 | var express = require('express'); | 1 | var express = require('express'); |
| 2 | var async = require('async'); | 2 | var async = require('async'); |
| 3 | var router = express.Router(); | 3 | var router = express.Router(); |
| 4 | +var mysql = require('mysql'); | ||
| 5 | + | ||
| 6 | +var connection = mysql.createConnection({ | ||
| 7 | + host : 'localhost', | ||
| 8 | + user : 'soap', | ||
| 9 | + password : '111111', | ||
| 10 | + port : 3306, | ||
| 11 | + database : 'ytmt' | ||
| 12 | +}); | ||
| 4 | 13 | ||
| 5 | function getYourToons(id,cb){ | 14 | function getYourToons(id,cb){ |
| 6 | //현재 로그인한 유저가 아닌 다른 유저들의 내툰리스트 가져오기 | 15 | //현재 로그인한 유저가 아닌 다른 유저들의 내툰리스트 가져오기 | ... | ... |
-
Please register or login to post a comment