윤혜원

DB에 user, toon 정보 INSERT 성공!

...@@ -2,5 +2,6 @@ ...@@ -2,5 +2,6 @@
2 <project version="4"> 2 <project version="4">
3 <component name="VcsDirectoryMappings"> 3 <component name="VcsDirectoryMappings">
4 <mapping directory="$PROJECT_DIR$" vcs="Git" /> 4 <mapping directory="$PROJECT_DIR$" vcs="Git" />
5 + <mapping directory="$PROJECT_DIR$/YTMT" vcs="Git" />
5 </component> 6 </component>
6 </project> 7 </project>
...\ No newline at end of file ...\ No newline at end of file
......
...@@ -2,8 +2,11 @@ ...@@ -2,8 +2,11 @@
2 <project version="4"> 2 <project version="4">
3 <component name="ChangeListManager"> 3 <component name="ChangeListManager">
4 <list default="true" id="ffe1a490-8fdb-4611-8537-4d1c03c40b8d" name="Default" comment=""> 4 <list default="true" id="ffe1a490-8fdb-4611-8537-4d1c03c40b8d" name="Default" comment="">
5 + <change beforePath="$PROJECT_DIR$/.idea/vcs.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
5 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> 6 <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
7 + <change beforePath="$PROJECT_DIR$/app.js" beforeDir="false" afterPath="$PROJECT_DIR$/app.js" afterDir="false" />
6 <change beforePath="$PROJECT_DIR$/routes/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/index.js" afterDir="false" /> 8 <change beforePath="$PROJECT_DIR$/routes/index.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/index.js" afterDir="false" />
9 + <change beforePath="$PROJECT_DIR$/routes/mytoons.js" beforeDir="false" afterPath="$PROJECT_DIR$/routes/mytoons.js" afterDir="false" />
7 </list> 10 </list>
8 <ignored path="$PROJECT_DIR$/out/" /> 11 <ignored path="$PROJECT_DIR$/out/" />
9 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> 12 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
...@@ -102,41 +105,70 @@ ...@@ -102,41 +105,70 @@
102 </counts> 105 </counts>
103 </usages-collector> 106 </usages-collector>
104 </session> 107 </session>
108 + <session id="-66201460">
109 + <usages-collector id="statistics.lifecycle.project">
110 + <counts>
111 + <entry key="project.closed" value="1" />
112 + <entry key="project.open.time.10" value="1" />
113 + <entry key="project.opened" value="1" />
114 + </counts>
115 + </usages-collector>
116 + <usages-collector id="statistics.file.extensions.open">
117 + <counts>
118 + <entry key="js" value="2" />
119 + </counts>
120 + </usages-collector>
121 + <usages-collector id="statistics.file.types.open">
122 + <counts>
123 + <entry key="JavaScript" value="2" />
124 + </counts>
125 + </usages-collector>
126 + <usages-collector id="statistics.file.extensions.edit">
127 + <counts>
128 + <entry key="js" value="868" />
129 + </counts>
130 + </usages-collector>
131 + <usages-collector id="statistics.file.types.edit">
132 + <counts>
133 + <entry key="JavaScript" value="868" />
134 + </counts>
135 + </usages-collector>
136 + </session>
105 </component> 137 </component>
106 <component name="FileEditorManager"> 138 <component name="FileEditorManager">
107 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> 139 <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
108 <file pinned="false" current-in-tab="false"> 140 <file pinned="false" current-in-tab="false">
109 <entry file="file://$PROJECT_DIR$/routes/mytoons.js"> 141 <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
110 <provider selected="true" editor-type-id="text-editor"> 142 <provider selected="true" editor-type-id="text-editor">
111 - <state relative-caret-position="1349"> 143 + <state relative-caret-position="141">
112 - <caret line="71" column="24" selection-start-line="71" selection-start-column="24" selection-end-line="71" selection-end-column="24" /> 144 + <caret line="54" column="36" selection-start-line="54" selection-start-column="36" selection-end-line="54" selection-end-column="36" />
113 </state> 145 </state>
114 </provider> 146 </provider>
115 </entry> 147 </entry>
116 </file> 148 </file>
117 <file pinned="false" current-in-tab="false"> 149 <file pinned="false" current-in-tab="false">
118 - <entry file="file://$PROJECT_DIR$/routes/setting.js"> 150 + <entry file="file://$PROJECT_DIR$/routes/toonviewer.js">
119 <provider selected="true" editor-type-id="text-editor"> 151 <provider selected="true" editor-type-id="text-editor">
120 - <state relative-caret-position="247"> 152 + <state>
121 - <caret line="13" column="11" selection-start-line="13" selection-start-column="11" selection-end-line="13" selection-end-column="11" /> 153 + <caret lean-forward="true" />
122 </state> 154 </state>
123 </provider> 155 </provider>
124 </entry> 156 </entry>
125 </file> 157 </file>
126 - <file pinned="false" current-in-tab="true"> 158 + <file pinned="false" current-in-tab="false">
127 - <entry file="file://$PROJECT_DIR$/routes/index.js"> 159 + <entry file="file://$PROJECT_DIR$/routes/setting.js">
128 <provider selected="true" editor-type-id="text-editor"> 160 <provider selected="true" editor-type-id="text-editor">
129 - <state relative-caret-position="19"> 161 + <state>
130 - <caret line="188" lean-forward="true" selection-start-line="188" selection-end-line="188" /> 162 + <caret lean-forward="true" />
131 </state> 163 </state>
132 </provider> 164 </provider>
133 </entry> 165 </entry>
134 </file> 166 </file>
135 - <file pinned="false" current-in-tab="false"> 167 + <file pinned="false" current-in-tab="true">
136 - <entry file="file://$PROJECT_DIR$/views/index.ejs"> 168 + <entry file="file://$PROJECT_DIR$/routes/index.js">
137 <provider selected="true" editor-type-id="text-editor"> 169 <provider selected="true" editor-type-id="text-editor">
138 - <state relative-caret-position="399"> 170 + <state relative-caret-position="583">
139 - <caret line="21" column="15" lean-forward="true" selection-start-line="21" selection-start-column="15" selection-end-line="21" selection-end-column="15" /> 171 + <caret line="336" lean-forward="true" selection-start-line="336" selection-end-line="336" />
140 </state> 172 </state>
141 </provider> 173 </provider>
142 </entry> 174 </entry>
...@@ -144,8 +176,8 @@ ...@@ -144,8 +176,8 @@
144 <file pinned="false" current-in-tab="false"> 176 <file pinned="false" current-in-tab="false">
145 <entry file="file://$PROJECT_DIR$/app.js"> 177 <entry file="file://$PROJECT_DIR$/app.js">
146 <provider selected="true" editor-type-id="text-editor"> 178 <provider selected="true" editor-type-id="text-editor">
147 - <state relative-caret-position="1425"> 179 + <state relative-caret-position="397">
148 - <caret line="75" column="16" lean-forward="true" selection-start-line="75" selection-start-column="16" selection-end-line="75" selection-end-column="16" /> 180 + <caret line="32" lean-forward="true" selection-start-line="32" selection-end-line="32" />
149 </state> 181 </state>
150 </provider> 182 </provider>
151 </entry> 183 </entry>
...@@ -162,8 +194,6 @@ ...@@ -162,8 +194,6 @@
162 </component> 194 </component>
163 <component name="FindInProjectRecents"> 195 <component name="FindInProjectRecents">
164 <findStrings> 196 <findStrings>
165 - <find>mytoon</find>
166 - <find>list</find>
167 <find>authen</find> 197 <find>authen</find>
168 <find>connection.</find> 198 <find>connection.</find>
169 <find>connection.end</find> 199 <find>connection.end</find>
...@@ -178,7 +208,6 @@ ...@@ -178,7 +208,6 @@
178 <find>query</find> 208 <find>query</find>
179 <find>br</find> 209 <find>br</find>
180 <find>kakao</find> 210 <find>kakao</find>
181 - <find>로그인</find>
182 <find>get</find> 211 <find>get</find>
183 <find>serialized</find> 212 <find>serialized</find>
184 <find>쿼리</find> 213 <find>쿼리</find>
...@@ -190,6 +219,11 @@ ...@@ -190,6 +219,11 @@
190 <find>connec</find> 219 <find>connec</find>
191 <find>connection</find> 220 <find>connection</find>
192 <find>로그인 쿼리</find> 221 <find>로그인 쿼리</find>
222 + <find>sql</find>
223 + <find>loginByThirdparty</find>
224 + <find>de</find>
225 + <find>로그인</find>
226 + <find>console.log(</find>
193 </findStrings> 227 </findStrings>
194 <dirStrings> 228 <dirStrings>
195 <dir>$PROJECT_DIR$/views</dir> 229 <dir>$PROJECT_DIR$/views</dir>
...@@ -227,15 +261,15 @@ ...@@ -227,15 +261,15 @@
227 <option value="$PROJECT_DIR$/views/toonviewer.html" /> 261 <option value="$PROJECT_DIR$/views/toonviewer.html" />
228 <option value="$PROJECT_DIR$/views/toonviewer.ejs" /> 262 <option value="$PROJECT_DIR$/views/toonviewer.ejs" />
229 <option value="$PROJECT_DIR$/node_modules/phantomjs/lib/phantom/examples/module.js" /> 263 <option value="$PROJECT_DIR$/node_modules/phantomjs/lib/phantom/examples/module.js" />
230 - <option value="$PROJECT_DIR$/routes/mytoons.js" />
231 <option value="$PROJECT_DIR$/routes/setting.js" /> 264 <option value="$PROJECT_DIR$/routes/setting.js" />
232 <option value="$PROJECT_DIR$/routes/toonviewer.js" /> 265 <option value="$PROJECT_DIR$/routes/toonviewer.js" />
233 <option value="$PROJECT_DIR$/views/mytoons.ejs" /> 266 <option value="$PROJECT_DIR$/views/mytoons.ejs" />
234 <option value="$PROJECT_DIR$/views/daum" /> 267 <option value="$PROJECT_DIR$/views/daum" />
235 <option value="$PROJECT_DIR$/views/daum.ejs" /> 268 <option value="$PROJECT_DIR$/views/daum.ejs" />
236 <option value="$PROJECT_DIR$/views/index.ejs" /> 269 <option value="$PROJECT_DIR$/views/index.ejs" />
237 - <option value="$PROJECT_DIR$/app.js" />
238 <option value="$PROJECT_DIR$/routes/daum.js" /> 270 <option value="$PROJECT_DIR$/routes/daum.js" />
271 + <option value="$PROJECT_DIR$/app.js" />
272 + <option value="$PROJECT_DIR$/routes/mytoons.js" />
239 <option value="$PROJECT_DIR$/routes/index.js" /> 273 <option value="$PROJECT_DIR$/routes/index.js" />
240 </list> 274 </list>
241 </option> 275 </option>
...@@ -257,9 +291,9 @@ ...@@ -257,9 +291,9 @@
257 </packageJsonPaths> 291 </packageJsonPaths>
258 </component> 292 </component>
259 <component name="ProjectFrameBounds" extendedState="6"> 293 <component name="ProjectFrameBounds" extendedState="6">
260 - <option name="x" value="-9" /> 294 + <option name="x" value="-8" />
261 - <option name="width" value="978" /> 295 + <option name="width" value="977" />
262 - <option name="height" value="1039" /> 296 + <option name="height" value="1038" />
263 </component> 297 </component>
264 <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> 298 <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
265 <component name="ProjectView"> 299 <component name="ProjectView">
...@@ -267,6 +301,7 @@ ...@@ -267,6 +301,7 @@
267 <foldersAlwaysOnTop value="true" /> 301 <foldersAlwaysOnTop value="true" />
268 </navigator> 302 </navigator>
269 <panes> 303 <panes>
304 + <pane id="Scope" />
270 <pane id="ProjectPane"> 305 <pane id="ProjectPane">
271 <subPane> 306 <subPane>
272 <expand> 307 <expand>
...@@ -282,17 +317,6 @@ ...@@ -282,17 +317,6 @@
282 <path> 317 <path>
283 <item name="YTMT" type="b2602c69:ProjectViewProjectNode" /> 318 <item name="YTMT" type="b2602c69:ProjectViewProjectNode" />
284 <item name="YTMT" type="462c0819:PsiDirectoryNode" /> 319 <item name="YTMT" type="462c0819:PsiDirectoryNode" />
285 - <item name="public" type="462c0819:PsiDirectoryNode" />
286 - </path>
287 - <path>
288 - <item name="YTMT" type="b2602c69:ProjectViewProjectNode" />
289 - <item name="YTMT" type="462c0819:PsiDirectoryNode" />
290 - <item name="public" type="462c0819:PsiDirectoryNode" />
291 - <item name="stylesheets" type="462c0819:PsiDirectoryNode" />
292 - </path>
293 - <path>
294 - <item name="YTMT" type="b2602c69:ProjectViewProjectNode" />
295 - <item name="YTMT" type="462c0819:PsiDirectoryNode" />
296 <item name="routes" type="462c0819:PsiDirectoryNode" /> 320 <item name="routes" type="462c0819:PsiDirectoryNode" />
297 </path> 321 </path>
298 <path> 322 <path>
...@@ -304,7 +328,6 @@ ...@@ -304,7 +328,6 @@
304 <select /> 328 <select />
305 </subPane> 329 </subPane>
306 </pane> 330 </pane>
307 - <pane id="Scope" />
308 <pane id="AndroidView" /> 331 <pane id="AndroidView" />
309 <pane id="PackagesPane" /> 332 <pane id="PackagesPane" />
310 </panes> 333 </panes>
...@@ -463,6 +486,7 @@ ...@@ -463,6 +486,7 @@
463 <workItem from="1543487409434" duration="1283000" /> 486 <workItem from="1543487409434" duration="1283000" />
464 <workItem from="1543489136305" duration="5743000" /> 487 <workItem from="1543489136305" duration="5743000" />
465 <workItem from="1543495038044" duration="387000" /> 488 <workItem from="1543495038044" duration="387000" />
489 + <workItem from="1543588884449" duration="7362000" />
466 </task> 490 </task>
467 <task id="LOCAL-00001" summary="초기 commit by intellij"> 491 <task id="LOCAL-00001" summary="초기 commit by intellij">
468 <created>1512174269218</created> 492 <created>1512174269218</created>
...@@ -482,7 +506,7 @@ ...@@ -482,7 +506,7 @@
482 <servers /> 506 <servers />
483 </component> 507 </component>
484 <component name="TimeTrackingManager"> 508 <component name="TimeTrackingManager">
485 - <option name="totallyTimeSpent" value="219277000" /> 509 + <option name="totallyTimeSpent" value="226639000" />
486 </component> 510 </component>
487 <component name="TodoView"> 511 <component name="TodoView">
488 <todo-panel id="selected-file"> 512 <todo-panel id="selected-file">
...@@ -495,7 +519,6 @@ ...@@ -495,7 +519,6 @@
495 </component> 519 </component>
496 <component name="ToolWindowManager"> 520 <component name="ToolWindowManager">
497 <frame x="-7" y="-7" width="1550" height="838" extended-state="6" /> 521 <frame x="-7" y="-7" width="1550" height="838" extended-state="6" />
498 - <editor active="true" />
499 <layout> 522 <layout>
500 <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48880598" visible="true" weight="0.16523464" /> 523 <window_info active="true" content_ui="combo" id="Project" order="0" sideWeight="0.48880598" visible="true" weight="0.16523464" />
501 <window_info id="Structure" order="1" weight="0.24964234" /> 524 <window_info id="Structure" order="1" weight="0.24964234" />
...@@ -656,83 +679,90 @@ ...@@ -656,83 +679,90 @@
656 </state> 679 </state>
657 </provider> 680 </provider>
658 </entry> 681 </entry>
659 - <entry file="file://$PROJECT_DIR$/views/toonviewer.ejs"> 682 + <entry file="file://$PROJECT_DIR$/views/daum" />
683 + <entry file="file://$PROJECT_DIR$/routes/users.js">
660 <provider selected="true" editor-type-id="text-editor"> 684 <provider selected="true" editor-type-id="text-editor">
661 - <state relative-caret-position="247"> 685 + <state relative-caret-position="133">
662 - <caret line="13" column="3" lean-forward="true" selection-start-line="13" selection-start-column="3" selection-end-line="13" selection-end-column="3" /> 686 + <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" />
663 </state> 687 </state>
664 </provider> 688 </provider>
665 </entry> 689 </entry>
690 + <entry file="file://$PROJECT_DIR$/views/daum.ejs" />
691 + <entry file="file://$PROJECT_DIR$/routes/daum.js" />
666 <entry file="file://$PROJECT_DIR$/views/setting.ejs"> 692 <entry file="file://$PROJECT_DIR$/views/setting.ejs">
667 <provider selected="true" editor-type-id="text-editor"> 693 <provider selected="true" editor-type-id="text-editor">
668 - <state relative-caret-position="27"> 694 + <state>
669 - <caret line="16" column="21" lean-forward="true" selection-start-line="16" selection-start-column="21" selection-end-line="16" selection-end-column="21" /> 695 + <caret lean-forward="true" />
670 </state> 696 </state>
671 </provider> 697 </provider>
672 </entry> 698 </entry>
673 - <entry file="file://$PROJECT_DIR$/views/error.ejs"> 699 + <entry file="file://$PROJECT_DIR$/views/toonviewer.ejs">
674 <provider selected="true" editor-type-id="text-editor"> 700 <provider selected="true" editor-type-id="text-editor">
675 - <state relative-caret-position="57"> 701 + <state relative-caret-position="247">
676 - <caret line="3" lean-forward="true" selection-start-line="3" selection-end-line="3" /> 702 + <caret line="13" column="3" selection-start-line="13" selection-start-column="3" selection-end-line="13" selection-end-column="3" />
677 </state> 703 </state>
678 </provider> 704 </provider>
679 </entry> 705 </entry>
680 - <entry file="file://$PROJECT_DIR$/views/mytoons.ejs"> 706 + <entry file="file://$PROJECT_DIR$/views/index.ejs">
681 <provider selected="true" editor-type-id="text-editor"> 707 <provider selected="true" editor-type-id="text-editor">
682 - <state relative-caret-position="513"> 708 + <state relative-caret-position="399">
683 - <caret line="27" column="11" lean-forward="true" selection-start-line="27" selection-start-column="11" selection-end-line="27" selection-end-column="11" /> 709 + <caret line="21" column="8" selection-start-line="21" selection-start-column="8" selection-end-line="21" selection-end-column="8" />
684 </state> 710 </state>
685 </provider> 711 </provider>
686 </entry> 712 </entry>
687 - <entry file="file://$PROJECT_DIR$/routes/toonviewer.js"> 713 + <entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
688 <provider selected="true" editor-type-id="text-editor"> 714 <provider selected="true" editor-type-id="text-editor">
689 - <state relative-caret-position="-418"> 715 + <state relative-caret-position="616">
690 - <caret line="5" lean-forward="true" selection-start-line="5" selection-end-line="5" /> 716 + <caret line="56" lean-forward="true" selection-start-line="56" selection-end-line="56" />
691 </state> 717 </state>
692 </provider> 718 </provider>
693 </entry> 719 </entry>
694 - <entry file="file://$PROJECT_DIR$/views/daum" /> 720 + <entry file="file://$PROJECT_DIR$/views/error.ejs">
695 - <entry file="file://$PROJECT_DIR$/routes/users.js">
696 <provider selected="true" editor-type-id="text-editor"> 721 <provider selected="true" editor-type-id="text-editor">
697 - <state relative-caret-position="133"> 722 + <state relative-caret-position="57">
698 - <caret line="7" lean-forward="true" selection-start-line="7" selection-end-line="7" /> 723 + <caret line="3" selection-start-line="3" selection-end-line="3" />
699 </state> 724 </state>
700 </provider> 725 </provider>
701 </entry> 726 </entry>
702 - <entry file="file://$PROJECT_DIR$/views/daum.ejs" /> 727 + <entry file="file://$PROJECT_DIR$/routes/toonviewer.js">
703 - <entry file="file://$PROJECT_DIR$/routes/daum.js" />
704 - <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
705 <provider selected="true" editor-type-id="text-editor"> 728 <provider selected="true" editor-type-id="text-editor">
706 - <state relative-caret-position="1349"> 729 + <state>
707 - <caret line="71" column="24" selection-start-line="71" selection-start-column="24" selection-end-line="71" selection-end-column="24" /> 730 + <caret lean-forward="true" />
708 </state> 731 </state>
709 </provider> 732 </provider>
710 </entry> 733 </entry>
711 - <entry file="file://$PROJECT_DIR$/routes/setting.js"> 734 + <entry file="file://$USER_HOME$/Desktop/YTMT-master-f6ba581c2d39966c105a13a31a3246237b655d48/YTMT-master-f6ba581c2d39966c105a13a31a3246237b655d48/app.js">
712 <provider selected="true" editor-type-id="text-editor"> 735 <provider selected="true" editor-type-id="text-editor">
713 - <state relative-caret-position="247"> 736 + <state>
714 - <caret line="13" column="11" selection-start-line="13" selection-start-column="11" selection-end-line="13" selection-end-column="11" /> 737 + <caret lean-forward="true" />
715 </state> 738 </state>
716 </provider> 739 </provider>
717 </entry> 740 </entry>
718 - <entry file="file://$PROJECT_DIR$/views/index.ejs"> 741 + <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
719 <provider selected="true" editor-type-id="text-editor"> 742 <provider selected="true" editor-type-id="text-editor">
720 - <state relative-caret-position="399"> 743 + <state relative-caret-position="141">
721 - <caret line="21" column="15" lean-forward="true" selection-start-line="21" selection-start-column="15" selection-end-line="21" selection-end-column="15" /> 744 + <caret line="54" column="36" selection-start-line="54" selection-start-column="36" selection-end-line="54" selection-end-column="36" />
722 </state> 745 </state>
723 </provider> 746 </provider>
724 </entry> 747 </entry>
725 <entry file="file://$PROJECT_DIR$/app.js"> 748 <entry file="file://$PROJECT_DIR$/app.js">
726 <provider selected="true" editor-type-id="text-editor"> 749 <provider selected="true" editor-type-id="text-editor">
727 - <state relative-caret-position="1425"> 750 + <state relative-caret-position="397">
728 - <caret line="75" column="16" lean-forward="true" selection-start-line="75" selection-start-column="16" selection-end-line="75" selection-end-column="16" /> 751 + <caret line="32" lean-forward="true" selection-start-line="32" selection-end-line="32" />
752 + </state>
753 + </provider>
754 + </entry>
755 + <entry file="file://$PROJECT_DIR$/routes/setting.js">
756 + <provider selected="true" editor-type-id="text-editor">
757 + <state>
758 + <caret lean-forward="true" />
729 </state> 759 </state>
730 </provider> 760 </provider>
731 </entry> 761 </entry>
732 <entry file="file://$PROJECT_DIR$/routes/index.js"> 762 <entry file="file://$PROJECT_DIR$/routes/index.js">
733 <provider selected="true" editor-type-id="text-editor"> 763 <provider selected="true" editor-type-id="text-editor">
734 - <state relative-caret-position="19"> 764 + <state relative-caret-position="583">
735 - <caret line="188" lean-forward="true" selection-start-line="188" selection-end-line="188" /> 765 + <caret line="336" lean-forward="true" selection-start-line="336" selection-end-line="336" />
736 </state> 766 </state>
737 </provider> 767 </provider>
738 </entry> 768 </entry>
......
...@@ -15,9 +15,7 @@ var setting = require('./routes/setting'); ...@@ -15,9 +15,7 @@ var setting = require('./routes/setting');
15 var session = require('express-session'); 15 var session = require('express-session');
16 var toonviewer = require('./routes/toonviewer'); 16 var toonviewer = require('./routes/toonviewer');
17 17
18 -
19 //port 18 //port
20 -
21 passport.serializeUser(function(user, done) { 19 passport.serializeUser(function(user, done) {
22 console.log('serialized'); 20 console.log('serialized');
23 done(null, user); 21 done(null, user);
...@@ -44,7 +42,7 @@ app.use(express.static(path.join(__dirname, 'public'))); ...@@ -44,7 +42,7 @@ app.use(express.static(path.join(__dirname, 'public')));
44 connection = mysql.createConnection({ 42 connection = mysql.createConnection({
45 host : 'localhost', 43 host : 'localhost',
46 user : 'root', 44 user : 'root',
47 - password : 'hs970010!', 45 + password : 'password',
48 port : 3306, 46 port : 3306,
49 database : 'ytmt' 47 database : 'ytmt'
50 }); 48 });
...@@ -62,8 +60,6 @@ app.use('/users', users); ...@@ -62,8 +60,6 @@ app.use('/users', users);
62 app.use('/mytoons', mytoons); 60 app.use('/mytoons', mytoons);
63 app.use('/setting', setting); 61 app.use('/setting', setting);
64 app.use('/toonviewer', toonviewer); 62 app.use('/toonviewer', toonviewer);
65 -//app.use('/daum', daum);
66 -
67 //app.use(express.static('views')); 63 //app.use(express.static('views'));
68 64
69 // catch 404 and forward to error handler 65 // catch 404 and forward to error handler
......
...@@ -9,8 +9,8 @@ var passport = require('passport'), ...@@ -9,8 +9,8 @@ var passport = require('passport'),
9 9
10 passport.use(new KakaoStrategy({ 10 passport.use(new KakaoStrategy({
11 clientID : 'bd2e610396fb7bbb84cf91a786b3cc72', 11 clientID : 'bd2e610396fb7bbb84cf91a786b3cc72',
12 - callbackURL :'/auth/login/kakao/callback' 12 + callbackURL :'/auth/login/kakao/callback',
13 - // clientSecret : 'eUtJGtlLoCZJufevp3LKfDP0KOtZUV7R' 13 + clientSecret : 'eUtJGtlLoCZJufevp3LKfDP0KOtZUV7R'
14 }, 14 },
15 function(accessToken, refreshToken,params, profile, done){ 15 function(accessToken, refreshToken,params, profile, done){
16 //사용자 정보는 profile에 16 //사용자 정보는 profile에
...@@ -41,8 +41,11 @@ router.get('/auth/login/kakao/callback', ...@@ -41,8 +41,11 @@ router.get('/auth/login/kakao/callback',
41 ); 41 );
42 42
43 function loginByThirdparty(accessToken, refreshToken, profile) { 43 function loginByThirdparty(accessToken, refreshToken, profile) {
44 - var stmt_duplicated = 'INSERT INTO user(id) VALUES(?) ON DUPLICATE KEY UPDATE id=?;' 44 + //예전 코드는 MySQL 버젼이 맞지 않음
45 - connection.query(stmt_duplicated, [profile._json.id] , function (err, result) { 45 + // var sql = 'INSERT INTO `user`(id) VALUES(?) ON DUPLICATE KEY(PRIMARY) UPDATE id=(?);'
46 + var sql = "INSERT INTO `user` (id) VALUES (?) ON DUPLICATE KEY UPDATE id=id";
47 + var kid=[profile._json.id];
48 + connection.query(sql,kid,function(err,result){
46 if (err) { 49 if (err) {
47 console.log("로그인 쿼리중 에러 : " + err); 50 console.log("로그인 쿼리중 에러 : " + err);
48 } else { 51 } else {
...@@ -59,7 +62,7 @@ router.get('/auth/logout/kakao',function (req,res) { ...@@ -59,7 +62,7 @@ router.get('/auth/logout/kakao',function (req,res) {
59 allWebtoons = new Array(); 62 allWebtoons = new Array();
60 63
61 function getLatestToon(titleid, day ,cb) { 64 function getLatestToon(titleid, day ,cb) {
62 - var url = "http://comic.naver.com/webtoon/list.nhn?titleId=" + titleid+ "&weekday="+day; 65 + /*var url = "http://comic.naver.com/webtoon/list.nhn?titleId=" + titleid+ "&weekday="+day;
63 console.log(url); 66 console.log(url);
64 request(url, function (err, res, html) { 67 request(url, function (err, res, html) {
65 if (!err) { 68 if (!err) {
...@@ -88,7 +91,7 @@ function getLatestToon(titleid, day ,cb) { ...@@ -88,7 +91,7 @@ function getLatestToon(titleid, day ,cb) {
88 console.log("최신화 못가져왔습니다."); 91 console.log("최신화 못가져왔습니다.");
89 //throw err; 92 //throw err;
90 } 93 }
91 - }); 94 + });*/
92 } 95 }
93 96
94 function getAllToons() { 97 function getAllToons() {
...@@ -150,7 +153,7 @@ function getAllToons() { ...@@ -150,7 +153,7 @@ function getAllToons() {
150 var list = data["data"]; 153 var list = data["data"];
151 154
152 list.forEach(function(item, idx){ 155 list.forEach(function(item, idx){
153 - console.log(item.id + ' ' + item.title + ' ' + wed); 156 +
154 var webtoon_link='http://webtoon.daum.net/webtoon/view/'+item.nickname.toString(); 157 var webtoon_link='http://webtoon.daum.net/webtoon/view/'+item.nickname.toString();
155 var webtoon= { 158 var webtoon= {
156 toon_index: item.id, 159 toon_index: item.id,
...@@ -279,23 +282,30 @@ function getAllToons() { ...@@ -279,23 +282,30 @@ function getAllToons() {
279 site : site, 282 site : site,
280 latest : 0 283 latest : 0
281 }; 284 };
282 -
283 allWebtoonList.push(webtoon); 285 allWebtoonList.push(webtoon);
284 }); 286 });
285 p.then(function() { 287 p.then(function() {
286 i = 0; 288 i = 0;
287 allWebtoonList.forEach(function (webtoon) { 289 allWebtoonList.forEach(function (webtoon) {
288 - getLatestToon(webtoon.toon_index, webtoon.week, function (latest_toon) { 290 + // getLatestToon(webtoon.toon_index, webtoon.week, function (latest_toon) {
289 - webtoon.latest = latest_toon.latest; 291 + // webtoon.latest = latest_toon.latest;
290 - console.log(i + " = " + webtoon.name + " : " + webtoon.latest) 292 + //i++;
291 - i++; 293 + //console.log(i + " = " + webtoon.name + " : " + webtoon.latest);
292 - connection.query("INSERT INTO toon SET ? ON DUPLICATE KEY UPDATE latest=?", 294 + var sql= "INSERT INTO `toon` (toon_index, name, thum_link, webtoon_link, week, site, latest) VALUES(?) ON DUPLICATE KEY UPDATE latest=latest";
293 - [webtoon,webtoon.latest], function () { 295 + var values=[webtoon.toon_index, webtoon.name, webtoon.thum_link, webtoon.webtoon_link,webtoon.week, webtoon.site, webtoon.latest];
294 - if(err){ 296 + connection.query(sql,[values],function(err,result){
295 - console.log("웹툰 갱신중 에러!"); 297 + if (err) {
296 - } 298 + console.log("웹툰 DB 에러 : " + err);
299 + } else {
300 + console.log("웹툰 DB처리 완료!");
301 + }
302 + //[webtoon,webtoon.latest], function () {
303 + // if (err) {
304 + // console.log("웹툰 갱신중 에러!");
305 + //}
306 + // }
297 }); 307 });
298 - }); 308 + //});
299 }) 309 })
300 }); 310 });
301 } 311 }
......
...@@ -33,7 +33,11 @@ function getUpdatedToons(cb){ ...@@ -33,7 +33,11 @@ function getUpdatedToons(cb){
33 } 33 }
34 34
35 function getMyToons(id,cb){ 35 function getMyToons(id,cb){
36 - var sqlquery = 'SELECT name, thum_link, webtoon_link, week, last, latest, t.toon_index AS toon_index FROM user u, user_toon_relation ur, toon t WHERE u.id=? && u.id=ur.user_id && t.toon_index=ur.toon_index;'; 36 + //var sql = "INSERT INTO `user` (id) VALUES (?)";
37 + //var kid=[profile._json.id];
38 + //connection.query(sql,kid,function(err,result){
39 + var sqlquery = "SELECT name, thum_link, webtoon_link, week, last, t.toon_index AS toon_index FROM user u, user_toon_relation ur, toon t WHERE u.id=? && u.id=ur.user_id && t.toon_index=ur.toon_index;";
40 + //var sqlquery = "SELECT name, thum_link, webtoon_link, week, last, latest, t.toon_index AS toon_index FROM user u, user_toon_relation ur, toon t WHERE u.id=? && u.id=ur.user_id && t.toon_index=ur.toon_index;";
37 var mylist = new Array(); 41 var mylist = new Array();
38 connection.query(sqlquery,id,function(err,rows,result){ 42 connection.query(sqlquery,id,function(err,rows,result){
39 if(!err){ 43 if(!err){
......