강현태

mytoons 추가

...@@ -20,21 +20,41 @@ ...@@ -20,21 +20,41 @@
20 <file leaf-file-name="app.js" pinned="false" current-in-tab="false"> 20 <file leaf-file-name="app.js" pinned="false" current-in-tab="false">
21 <entry file="file://$PROJECT_DIR$/app.js"> 21 <entry file="file://$PROJECT_DIR$/app.js">
22 <provider selected="true" editor-type-id="text-editor"> 22 <provider selected="true" editor-type-id="text-editor">
23 - <state relative-caret-position="420"> 23 + <state relative-caret-position="116">
24 - <caret line="28" column="29" lean-forward="false" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" /> 24 + <caret line="28" column="10" lean-forward="false" selection-start-line="28" selection-start-column="10" selection-end-line="28" selection-end-column="10" />
25 <folding> 25 <folding>
26 - <element signature="e#955#1027#0" expanded="false" /> 26 + <element signature="e#1031#1103#0" expanded="false" />
27 - <element signature="e#1086#1332#0" expanded="false" /> 27 + <element signature="e#1162#1408#0" expanded="false" />
28 </folding> 28 </folding>
29 </state> 29 </state>
30 </provider> 30 </provider>
31 </entry> 31 </entry>
32 </file> 32 </file>
33 - <file leaf-file-name="helloWorld.html" pinned="false" current-in-tab="false"> 33 + <file leaf-file-name="users.js" pinned="false" current-in-tab="false">
34 - <entry file="file://$PROJECT_DIR$/views/helloWorld.html"> 34 + <entry file="file://$PROJECT_DIR$/routes/users.js">
35 + <provider selected="true" editor-type-id="text-editor">
36 + <state relative-caret-position="90">
37 + <caret line="6" column="2" lean-forward="false" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="2" />
38 + <folding />
39 + </state>
40 + </provider>
41 + </entry>
42 + </file>
43 + <file leaf-file-name="mytoons.js" pinned="false" current-in-tab="false">
44 + <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
45 + <provider selected="true" editor-type-id="text-editor">
46 + <state relative-caret-position="90">
47 + <caret line="6" column="13" lean-forward="false" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
48 + <folding />
49 + </state>
50 + </provider>
51 + </entry>
52 + </file>
53 + <file leaf-file-name="mytoons.ejs" pinned="false" current-in-tab="false">
54 + <entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
35 <provider selected="true" editor-type-id="text-editor"> 55 <provider selected="true" editor-type-id="text-editor">
36 - <state relative-caret-position="60"> 56 + <state relative-caret-position="420">
37 - <caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" /> 57 + <caret line="28" column="28" lean-forward="false" selection-start-line="28" selection-start-column="28" selection-end-line="28" selection-end-column="28" />
38 <folding /> 58 <folding />
39 </state> 59 </state>
40 </provider> 60 </provider>
...@@ -43,9 +63,11 @@ ...@@ -43,9 +63,11 @@
43 <file leaf-file-name="index.ejs" pinned="false" current-in-tab="true"> 63 <file leaf-file-name="index.ejs" pinned="false" current-in-tab="true">
44 <entry file="file://$PROJECT_DIR$/views/index.ejs"> 64 <entry file="file://$PROJECT_DIR$/views/index.ejs">
45 <provider selected="true" editor-type-id="text-editor"> 65 <provider selected="true" editor-type-id="text-editor">
46 - <state relative-caret-position="269"> 66 + <state relative-caret-position="293">
47 - <caret line="56" column="14" lean-forward="false" selection-start-line="56" selection-start-column="14" selection-end-line="56" selection-end-column="92" /> 67 + <caret line="50" column="36" lean-forward="true" selection-start-line="50" selection-start-column="36" selection-end-line="50" selection-end-column="36" />
48 - <folding /> 68 + <folding>
69 + <marker date="1512231626965" expanded="true" signature="211:2070" ph="..." />
70 + </folding>
49 </state> 71 </state>
50 </provider> 72 </provider>
51 </entry> 73 </entry>
...@@ -53,8 +75,8 @@ ...@@ -53,8 +75,8 @@
53 <file leaf-file-name="index.js" pinned="false" current-in-tab="false"> 75 <file leaf-file-name="index.js" pinned="false" current-in-tab="false">
54 <entry file="file://$PROJECT_DIR$/routes/index.js"> 76 <entry file="file://$PROJECT_DIR$/routes/index.js">
55 <provider selected="true" editor-type-id="text-editor"> 77 <provider selected="true" editor-type-id="text-editor">
56 - <state relative-caret-position="0"> 78 + <state relative-caret-position="387">
57 - <caret line="0" column="33" lean-forward="false" selection-start-line="0" selection-start-column="33" selection-end-line="0" selection-end-column="33" /> 79 + <caret line="44" column="24" lean-forward="false" selection-start-line="44" selection-start-column="24" selection-end-line="44" selection-end-column="24" />
58 <folding /> 80 <folding />
59 </state> 81 </state>
60 </provider> 82 </provider>
...@@ -65,11 +87,20 @@ ...@@ -65,11 +87,20 @@
65 <component name="FileTemplateManagerImpl"> 87 <component name="FileTemplateManagerImpl">
66 <option name="RECENT_TEMPLATES"> 88 <option name="RECENT_TEMPLATES">
67 <list> 89 <list>
68 - <option value="JavaScript File" />
69 <option value="HTML File" /> 90 <option value="HTML File" />
91 + <option value="JavaScript File" />
70 </list> 92 </list>
71 </option> 93 </option>
72 </component> 94 </component>
95 + <component name="FindInProjectRecents">
96 + <findStrings>
97 + <find>mytoon</find>
98 + <find>list</find>
99 + </findStrings>
100 + <dirStrings>
101 + <dir>$PROJECT_DIR$/views</dir>
102 + </dirStrings>
103 + </component>
73 <component name="Git.Settings"> 104 <component name="Git.Settings">
74 <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" /> 105 <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
75 </component> 106 </component>
...@@ -84,10 +115,19 @@ ...@@ -84,10 +115,19 @@
84 <option value="$PROJECT_DIR$/bin/www" /> 115 <option value="$PROJECT_DIR$/bin/www" />
85 <option value="$PROJECT_DIR$/package.json" /> 116 <option value="$PROJECT_DIR$/package.json" />
86 <option value="$PROJECT_DIR$/controllers/webtoon_crawler.js" /> 117 <option value="$PROJECT_DIR$/controllers/webtoon_crawler.js" />
87 - <option value="$PROJECT_DIR$/routes/index.js" />
88 <option value="$PROJECT_DIR$/views/helloWorld.html" /> 118 <option value="$PROJECT_DIR$/views/helloWorld.html" />
89 - <option value="$PROJECT_DIR$/app.js" /> 119 + <option value="$PROJECT_DIR$/views/mysetting.html" />
120 + <option value="$PROJECT_DIR$/views/mysetting.ejs" />
121 + <option value="$PROJECT_DIR$/views/mytoon.ejs" />
122 + <option value="$PROJECT_DIR$/routes/mytoon.js" />
123 + <option value="$PROJECT_DIR$/routes/myList.js" />
124 + <option value="$PROJECT_DIR$/routes/myToons.js" />
90 <option value="$PROJECT_DIR$/views/index.ejs" /> 125 <option value="$PROJECT_DIR$/views/index.ejs" />
126 + <option value="$PROJECT_DIR$/app.js" />
127 + <option value="$PROJECT_DIR$/routes/index.js" />
128 + <option value="$PROJECT_DIR$/routes/users.js" />
129 + <option value="$PROJECT_DIR$/routes/mytoons.js" />
130 + <option value="$PROJECT_DIR$/views/mytoons.ejs" />
91 </list> 131 </list>
92 </option> 132 </option>
93 </component> 133 </component>
...@@ -273,7 +313,7 @@ ...@@ -273,7 +313,7 @@
273 <option name="presentableId" value="Default" /> 313 <option name="presentableId" value="Default" />
274 <updated>1512173581551</updated> 314 <updated>1512173581551</updated>
275 <workItem from="1512173589576" duration="1873000" /> 315 <workItem from="1512173589576" duration="1873000" />
276 - <workItem from="1512179289398" duration="35658000" /> 316 + <workItem from="1512179289398" duration="40441000" />
277 </task> 317 </task>
278 <task id="LOCAL-00001" summary="초기 commit by intellij"> 318 <task id="LOCAL-00001" summary="초기 commit by intellij">
279 <created>1512174269218</created> 319 <created>1512174269218</created>
...@@ -293,7 +333,7 @@ ...@@ -293,7 +333,7 @@
293 <servers /> 333 <servers />
294 </component> 334 </component>
295 <component name="TimeTrackingManager"> 335 <component name="TimeTrackingManager">
296 - <option name="totallyTimeSpent" value="37531000" /> 336 + <option name="totallyTimeSpent" value="42314000" />
297 </component> 337 </component>
298 <component name="ToolWindowManager"> 338 <component name="ToolWindowManager">
299 <frame x="0" y="0" width="1440" height="900" extended-state="0" /> 339 <frame x="0" y="0" width="1440" height="900" extended-state="0" />
...@@ -314,6 +354,7 @@ ...@@ -314,6 +354,7 @@
314 <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 354 <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
315 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16523606" sideWeight="0.48880598" order="0" side_tool="false" content_ui="combo" /> 355 <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16523606" sideWeight="0.48880598" order="0" side_tool="false" content_ui="combo" />
316 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> 356 <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
357 + <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
317 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 358 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
318 <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> 359 <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
319 <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> 360 <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
...@@ -325,7 +366,6 @@ ...@@ -325,7 +366,6 @@
325 <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> 366 <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
326 <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> 367 <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
327 <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> 368 <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
328 - <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
329 </layout> 369 </layout>
330 </component> 370 </component>
331 <component name="TypeScriptGeneratedFilesManager"> 371 <component name="TypeScriptGeneratedFilesManager">
...@@ -392,15 +432,9 @@ ...@@ -392,15 +432,9 @@
392 <provider selected="true" editor-type-id="text-editor"> 432 <provider selected="true" editor-type-id="text-editor">
393 <state relative-caret-position="0"> 433 <state relative-caret-position="0">
394 <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" /> 434 <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
395 - <folding /> 435 + <folding>
396 - </state> 436 + <marker date="1512231626965" expanded="true" signature="211:2070" ph="..." />
397 - </provider> 437 + </folding>
398 - </entry>
399 - <entry file="file://$PROJECT_DIR$/bin/www">
400 - <provider selected="true" editor-type-id="text-editor">
401 - <state relative-caret-position="-683">
402 - <caret line="0" column="1" lean-forward="false" selection-start-line="0" selection-start-column="1" selection-end-line="0" selection-end-column="1" />
403 - <folding />
404 </state> 438 </state>
405 </provider> 439 </provider>
406 </entry> 440 </entry>
...@@ -420,14 +454,6 @@ ...@@ -420,14 +454,6 @@
420 </state> 454 </state>
421 </provider> 455 </provider>
422 </entry> 456 </entry>
423 - <entry file="file://$PROJECT_DIR$/routes/users.js">
424 - <provider selected="true" editor-type-id="text-editor">
425 - <state relative-caret-position="75">
426 - <caret line="5" column="34" lean-forward="false" selection-start-line="5" selection-start-column="34" selection-end-line="5" selection-end-column="34" />
427 - <folding />
428 - </state>
429 - </provider>
430 - </entry>
431 <entry file="file://$PROJECT_DIR$/controllers/webtoon_crawler.js"> 457 <entry file="file://$PROJECT_DIR$/controllers/webtoon_crawler.js">
432 <provider selected="true" editor-type-id="text-editor"> 458 <provider selected="true" editor-type-id="text-editor">
433 <state relative-caret-position="150"> 459 <state relative-caret-position="150">
...@@ -452,41 +478,75 @@ ...@@ -452,41 +478,75 @@
452 </state> 478 </state>
453 </provider> 479 </provider>
454 </entry> 480 </entry>
481 + <entry file="file://$PROJECT_DIR$/views/helloWorld.html">
482 + <provider selected="true" editor-type-id="text-editor">
483 + <state relative-caret-position="60">
484 + <caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" />
485 + <folding />
486 + </state>
487 + </provider>
488 + </entry>
489 + <entry file="file://$PROJECT_DIR$/bin/www">
490 + <provider selected="true" editor-type-id="text-editor">
491 + <state relative-caret-position="0">
492 + <caret line="0" column="1" lean-forward="false" selection-start-line="0" selection-start-column="1" selection-end-line="0" selection-end-column="1" />
493 + <folding />
494 + </state>
495 + </provider>
496 + </entry>
455 <entry file="file://$PROJECT_DIR$/app.js"> 497 <entry file="file://$PROJECT_DIR$/app.js">
456 <provider selected="true" editor-type-id="text-editor"> 498 <provider selected="true" editor-type-id="text-editor">
457 - <state relative-caret-position="420"> 499 + <state relative-caret-position="116">
458 - <caret line="28" column="29" lean-forward="false" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" /> 500 + <caret line="28" column="10" lean-forward="false" selection-start-line="28" selection-start-column="10" selection-end-line="28" selection-end-column="10" />
459 <folding> 501 <folding>
460 - <element signature="e#955#1027#0" expanded="false" /> 502 + <element signature="e#1031#1103#0" expanded="false" />
461 - <element signature="e#1086#1332#0" expanded="false" /> 503 + <element signature="e#1162#1408#0" expanded="false" />
462 </folding> 504 </folding>
463 </state> 505 </state>
464 </provider> 506 </provider>
465 </entry> 507 </entry>
466 - <entry file="file://$PROJECT_DIR$/views/helloWorld.html"> 508 + <entry file="file://$PROJECT_DIR$/routes/index.js">
467 <provider selected="true" editor-type-id="text-editor"> 509 <provider selected="true" editor-type-id="text-editor">
468 - <state relative-caret-position="60"> 510 + <state relative-caret-position="387">
469 - <caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" /> 511 + <caret line="44" column="24" lean-forward="false" selection-start-line="44" selection-start-column="24" selection-end-line="44" selection-end-column="24" />
470 <folding /> 512 <folding />
471 </state> 513 </state>
472 </provider> 514 </provider>
473 </entry> 515 </entry>
474 - <entry file="file://$PROJECT_DIR$/routes/index.js"> 516 + <entry file="file://$PROJECT_DIR$/routes/users.js">
475 <provider selected="true" editor-type-id="text-editor"> 517 <provider selected="true" editor-type-id="text-editor">
476 - <state relative-caret-position="0"> 518 + <state relative-caret-position="90">
477 - <caret line="0" column="33" lean-forward="false" selection-start-line="0" selection-start-column="33" selection-end-line="0" selection-end-column="33" /> 519 + <caret line="6" column="2" lean-forward="false" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="2" />
478 <folding /> 520 <folding />
479 </state> 521 </state>
480 </provider> 522 </provider>
481 </entry> 523 </entry>
482 - <entry file="file://$PROJECT_DIR$/views/index.ejs"> 524 + <entry file="file://$PROJECT_DIR$/routes/mytoons.js">
525 + <provider selected="true" editor-type-id="text-editor">
526 + <state relative-caret-position="90">
527 + <caret line="6" column="13" lean-forward="false" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
528 + <folding />
529 + </state>
530 + </provider>
531 + </entry>
532 + <entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
483 <provider selected="true" editor-type-id="text-editor"> 533 <provider selected="true" editor-type-id="text-editor">
484 - <state relative-caret-position="269"> 534 + <state relative-caret-position="420">
485 - <caret line="56" column="14" lean-forward="false" selection-start-line="56" selection-start-column="14" selection-end-line="56" selection-end-column="92" /> 535 + <caret line="28" column="28" lean-forward="false" selection-start-line="28" selection-start-column="28" selection-end-line="28" selection-end-column="28" />
486 <folding /> 536 <folding />
487 </state> 537 </state>
488 </provider> 538 </provider>
489 </entry> 539 </entry>
540 + <entry file="file://$PROJECT_DIR$/views/index.ejs">
541 + <provider selected="true" editor-type-id="text-editor">
542 + <state relative-caret-position="293">
543 + <caret line="50" column="36" lean-forward="true" selection-start-line="50" selection-start-column="36" selection-end-line="50" selection-end-column="36" />
544 + <folding>
545 + <marker date="1512231626965" expanded="true" signature="211:2070" ph="..." />
546 + </folding>
547 + </state>
548 + </provider>
549 + </entry>
490 </component> 550 </component>
491 <component name="masterDetails"> 551 <component name="masterDetails">
492 <states> 552 <states>
......
...@@ -9,6 +9,7 @@ var cheerio = require('cheerio'); ...@@ -9,6 +9,7 @@ var cheerio = require('cheerio');
9 var request = require('request'); 9 var request = require('request');
10 var index = require('./routes/index'); 10 var index = require('./routes/index');
11 var users = require('./routes/users'); 11 var users = require('./routes/users');
12 +var mytoons = require('./routes/mytoons');
12 13
13 var app = express(); 14 var app = express();
14 15
...@@ -26,7 +27,9 @@ app.use(express.static(path.join(__dirname, 'public'))); ...@@ -26,7 +27,9 @@ app.use(express.static(path.join(__dirname, 'public')));
26 27
27 app.use('/', index); 28 app.use('/', index);
28 app.use('/users', users); 29 app.use('/users', users);
29 -app.use(express.static('views')); 30 +app.use('/mytoons', mytoons);
31 +
32 +//app.use(express.static('views'));
30 33
31 // catch 404 and forward to error handler 34 // catch 404 and forward to error handler
32 app.use(function(req, res, next) { 35 app.use(function(req, res, next) {
......
...@@ -38,6 +38,7 @@ router.get('/', function(req, res, next) { ...@@ -38,6 +38,7 @@ router.get('/', function(req, res, next) {
38 title: '니툰내툰', 38 title: '니툰내툰',
39 list: allWebtoons 39 list: allWebtoons
40 }); 40 });
41 +
41 }); 42 });
42 43
43 44
......
1 +var express = require('express');
2 +var cheerio = require('cheerio');
3 +var request = require('request');
4 +var router = express.Router();
5 +
6 +/* GET home page. */
7 +router.get('/', function(req, res, next) {
8 + res.render('mytoons');
9 +});
10 +
11 +module.exports = router;
...\ No newline at end of file ...\ No newline at end of file
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
9 <p>웹툰 리스트</p> 9 <p>웹툰 리스트</p>
10 <a id="kakao-login-btn"></a> 10 <a id="kakao-login-btn"></a>
11 <a id="kakao-logout-btn" href="javascript:logout();">로그아웃</a> 11 <a id="kakao-logout-btn" href="javascript:logout();">로그아웃</a>
12 - <a id="save_config">저장</a>
13 12
14 13
15 <table> 14 <table>
...@@ -51,6 +50,7 @@ ...@@ -51,6 +50,7 @@
51 // 카카오 로그인 버튼을 생성합니다. 50 // 카카오 로그인 버튼을 생성합니다.
52 Kakao.Auth.getStatus(function(statusObj){ 51 Kakao.Auth.getStatus(function(statusObj){
53 if(statusObj.status=='connected'){ 52 if(statusObj.status=='connected'){
53 + location.href="./mytoons";
54 document.getElementById('kakao-login-btn').setAttribute('style','display: none;'); 54 document.getElementById('kakao-login-btn').setAttribute('style','display: none;');
55 }else{ 55 }else{
56 document.getElementById('kakao-logout-btn').setAttribute('style','display: none;'); 56 document.getElementById('kakao-logout-btn').setAttribute('style','display: none;');
...@@ -62,11 +62,11 @@ ...@@ -62,11 +62,11 @@
62 container: '#kakao-login-btn', 62 container: '#kakao-login-btn',
63 size:'small', 63 size:'small',
64 success: function(authObj) { 64 success: function(authObj) {
65 - alert(JSON.stringify(authObj)); 65 + //alert(JSON.stringify(authObj));
66 location.reload(); 66 location.reload();
67 }, 67 },
68 fail: function(err) { 68 fail: function(err) {
69 - alert(JSON.stringify(err)); 69 + alert("로그인 실패!");
70 } 70 }
71 }); 71 });
72 72
......
1 +<!DOCTYPE html>
2 +<html>
3 +<head>
4 + <title>내툰</title>
5 + <link rel='stylesheet' href='/stylesheets/style.css' />
6 + <script src="http://developers.kakao.com/sdk/js/kakao.min.js"></script>
7 +</head>
8 +<h1>내툰</h1>
9 +<p>추가한 리스트</p>
10 +<a id="kakao-login-btn"></a>
11 +<a id="kakao-logout-btn" href="javascript:logout();">로그아웃</a>
12 +<a id="save_config">저장</a>
13 +
14 +
15 +<table>
16 +</table>
17 +</br>
18 +
19 +<script type='text/javascript'>
20 + //<![CDATA[
21 + // 사용할 앱의 JavaScript 키를 설정해 주세요.
22 + Kakao.init('602377cd7aa60a82eeebda466560f3e5');
23 + // 카카오 로그인 버튼을 생성합니다.
24 + Kakao.Auth.getStatus(function(statusObj){
25 + if(statusObj.status=='connected'){
26 + document.getElementById('kakao-login-btn').setAttribute('style','display: none;');
27 + }else{
28 + alert("로그인 해주세요!");
29 + location.href="/";
30 + document.getElementById('kakao-logout-btn').setAttribute('style','display: none;');
31 + document.getElementById('save_config').setAttribute('style','display: none;');
32 + }
33 + });
34 +
35 + Kakao.Auth.createLoginButton({
36 + container: '#kakao-login-btn',
37 + size:'small',
38 + success: function(authObj) {
39 + location.reload();
40 + },
41 + fail: function(err) {
42 + alert("로그인 실패!");
43 + }
44 + });
45 +
46 + function logout(){
47 + Kakao.Auth.logout(function () {
48 + location.reload();
49 + });
50 +
51 + }
52 + //]]>
53 +
54 +</script>
55 +
56 +</body>
57 +
58 +</html>