강현태

mytoons 추가

......@@ -20,21 +20,41 @@
<file leaf-file-name="app.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="28" column="29" lean-forward="false" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
<state relative-caret-position="116">
<caret line="28" column="10" lean-forward="false" selection-start-line="28" selection-start-column="10" selection-end-line="28" selection-end-column="10" />
<folding>
<element signature="e#955#1027#0" expanded="false" />
<element signature="e#1086#1332#0" expanded="false" />
<element signature="e#1031#1103#0" expanded="false" />
<element signature="e#1162#1408#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<file leaf-file-name="helloWorld.html" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/views/helloWorld.html">
<file leaf-file-name="users.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/routes/users.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" />
<state relative-caret-position="90">
<caret line="6" column="2" lean-forward="false" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="mytoons.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/routes/mytoons.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="90">
<caret line="6" column="13" lean-forward="false" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="mytoons.ejs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="28" column="28" lean-forward="false" selection-start-line="28" selection-start-column="28" selection-end-line="28" selection-end-column="28" />
<folding />
</state>
</provider>
......@@ -43,9 +63,11 @@
<file leaf-file-name="index.ejs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/views/index.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="269">
<caret line="56" column="14" lean-forward="false" selection-start-line="56" selection-start-column="14" selection-end-line="56" selection-end-column="92" />
<folding />
<state relative-caret-position="293">
<caret line="50" column="36" lean-forward="true" selection-start-line="50" selection-start-column="36" selection-end-line="50" selection-end-column="36" />
<folding>
<marker date="1512231626965" expanded="true" signature="211:2070" ph="..." />
</folding>
</state>
</provider>
</entry>
......@@ -53,8 +75,8 @@
<file leaf-file-name="index.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/routes/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="33" lean-forward="false" selection-start-line="0" selection-start-column="33" selection-end-line="0" selection-end-column="33" />
<state relative-caret-position="387">
<caret line="44" column="24" lean-forward="false" selection-start-line="44" selection-start-column="24" selection-end-line="44" selection-end-column="24" />
<folding />
</state>
</provider>
......@@ -65,11 +87,20 @@
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JavaScript File" />
<option value="HTML File" />
<option value="JavaScript File" />
</list>
</option>
</component>
<component name="FindInProjectRecents">
<findStrings>
<find>mytoon</find>
<find>list</find>
</findStrings>
<dirStrings>
<dir>$PROJECT_DIR$/views</dir>
</dirStrings>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
......@@ -84,10 +115,19 @@
<option value="$PROJECT_DIR$/bin/www" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/controllers/webtoon_crawler.js" />
<option value="$PROJECT_DIR$/routes/index.js" />
<option value="$PROJECT_DIR$/views/helloWorld.html" />
<option value="$PROJECT_DIR$/app.js" />
<option value="$PROJECT_DIR$/views/mysetting.html" />
<option value="$PROJECT_DIR$/views/mysetting.ejs" />
<option value="$PROJECT_DIR$/views/mytoon.ejs" />
<option value="$PROJECT_DIR$/routes/mytoon.js" />
<option value="$PROJECT_DIR$/routes/myList.js" />
<option value="$PROJECT_DIR$/routes/myToons.js" />
<option value="$PROJECT_DIR$/views/index.ejs" />
<option value="$PROJECT_DIR$/app.js" />
<option value="$PROJECT_DIR$/routes/index.js" />
<option value="$PROJECT_DIR$/routes/users.js" />
<option value="$PROJECT_DIR$/routes/mytoons.js" />
<option value="$PROJECT_DIR$/views/mytoons.ejs" />
</list>
</option>
</component>
......@@ -273,7 +313,7 @@
<option name="presentableId" value="Default" />
<updated>1512173581551</updated>
<workItem from="1512173589576" duration="1873000" />
<workItem from="1512179289398" duration="35658000" />
<workItem from="1512179289398" duration="40441000" />
</task>
<task id="LOCAL-00001" summary="초기 commit by intellij">
<created>1512174269218</created>
......@@ -293,7 +333,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="37531000" />
<option name="totallyTimeSpent" value="42314000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="900" extended-state="0" />
......@@ -314,6 +354,7 @@
<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" />
<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" />
<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" />
<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" />
<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" />
<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" />
<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 @@
<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" />
<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" />
<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" />
<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" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
......@@ -392,15 +432,9 @@
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/bin/www">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-683">
<caret line="0" column="1" lean-forward="false" selection-start-line="0" selection-start-column="1" selection-end-line="0" selection-end-column="1" />
<folding />
<folding>
<marker date="1512231626965" expanded="true" signature="211:2070" ph="..." />
</folding>
</state>
</provider>
</entry>
......@@ -420,14 +454,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/users.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="34" lean-forward="false" selection-start-line="5" selection-start-column="34" selection-end-line="5" selection-end-column="34" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/controllers/webtoon_crawler.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
......@@ -452,41 +478,75 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/helloWorld.html">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/bin/www">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="1" lean-forward="false" selection-start-line="0" selection-start-column="1" selection-end-line="0" selection-end-column="1" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="28" column="29" lean-forward="false" selection-start-line="28" selection-start-column="29" selection-end-line="28" selection-end-column="29" />
<state relative-caret-position="116">
<caret line="28" column="10" lean-forward="false" selection-start-line="28" selection-start-column="10" selection-end-line="28" selection-end-column="10" />
<folding>
<element signature="e#955#1027#0" expanded="false" />
<element signature="e#1086#1332#0" expanded="false" />
<element signature="e#1031#1103#0" expanded="false" />
<element signature="e#1162#1408#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/helloWorld.html">
<entry file="file://$PROJECT_DIR$/routes/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="60">
<caret line="4" column="16" lean-forward="false" selection-start-line="4" selection-start-column="11" selection-end-line="4" selection-end-column="16" />
<state relative-caret-position="387">
<caret line="44" column="24" lean-forward="false" selection-start-line="44" selection-start-column="24" selection-end-line="44" selection-end-column="24" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/index.js">
<entry file="file://$PROJECT_DIR$/routes/users.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="0">
<caret line="0" column="33" lean-forward="false" selection-start-line="0" selection-start-column="33" selection-end-line="0" selection-end-column="33" />
<state relative-caret-position="90">
<caret line="6" column="2" lean-forward="false" selection-start-line="6" selection-start-column="2" selection-end-line="6" selection-end-column="2" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/index.ejs">
<entry file="file://$PROJECT_DIR$/routes/mytoons.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="269">
<caret line="56" column="14" lean-forward="false" selection-start-line="56" selection-start-column="14" selection-end-line="56" selection-end-column="92" />
<state relative-caret-position="90">
<caret line="6" column="13" lean-forward="false" selection-start-line="6" selection-start-column="13" selection-end-line="6" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="420">
<caret line="28" column="28" lean-forward="false" selection-start-line="28" selection-start-column="28" selection-end-line="28" selection-end-column="28" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/index.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="293">
<caret line="50" column="36" lean-forward="true" selection-start-line="50" selection-start-column="36" selection-end-line="50" selection-end-column="36" />
<folding>
<marker date="1512231626965" expanded="true" signature="211:2070" ph="..." />
</folding>
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
......
......@@ -9,6 +9,7 @@ var cheerio = require('cheerio');
var request = require('request');
var index = require('./routes/index');
var users = require('./routes/users');
var mytoons = require('./routes/mytoons');
var app = express();
......@@ -26,7 +27,9 @@ app.use(express.static(path.join(__dirname, 'public')));
app.use('/', index);
app.use('/users', users);
app.use(express.static('views'));
app.use('/mytoons', mytoons);
//app.use(express.static('views'));
// catch 404 and forward to error handler
app.use(function(req, res, next) {
......
......@@ -38,6 +38,7 @@ router.get('/', function(req, res, next) {
title: '니툰내툰',
list: allWebtoons
});
});
......
var express = require('express');
var cheerio = require('cheerio');
var request = require('request');
var router = express.Router();
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('mytoons');
});
module.exports = router;
\ No newline at end of file
......@@ -9,7 +9,6 @@
<p>웹툰 리스트</p>
<a id="kakao-login-btn"></a>
<a id="kakao-logout-btn" href="javascript:logout();">로그아웃</a>
<a id="save_config">저장</a>
<table>
......@@ -51,6 +50,7 @@
// 카카오 로그인 버튼을 생성합니다.
Kakao.Auth.getStatus(function(statusObj){
if(statusObj.status=='connected'){
location.href="./mytoons";
document.getElementById('kakao-login-btn').setAttribute('style','display: none;');
}else{
document.getElementById('kakao-logout-btn').setAttribute('style','display: none;');
......@@ -62,11 +62,11 @@
container: '#kakao-login-btn',
size:'small',
success: function(authObj) {
alert(JSON.stringify(authObj));
//alert(JSON.stringify(authObj));
location.reload();
},
fail: function(err) {
alert(JSON.stringify(err));
alert("로그인 실패!");
}
});
......
<!DOCTYPE html>
<html>
<head>
<title>내툰</title>
<link rel='stylesheet' href='/stylesheets/style.css' />
<script src="http://developers.kakao.com/sdk/js/kakao.min.js"></script>
</head>
<h1>내툰</h1>
<p>추가한 리스트</p>
<a id="kakao-login-btn"></a>
<a id="kakao-logout-btn" href="javascript:logout();">로그아웃</a>
<a id="save_config">저장</a>
<table>
</table>
</br>
<script type='text/javascript'>
//<![CDATA[
// 사용할 앱의 JavaScript 키를 설정해 주세요.
Kakao.init('602377cd7aa60a82eeebda466560f3e5');
// 카카오 로그인 버튼을 생성합니다.
Kakao.Auth.getStatus(function(statusObj){
if(statusObj.status=='connected'){
document.getElementById('kakao-login-btn').setAttribute('style','display: none;');
}else{
alert("로그인 해주세요!");
location.href="/";
document.getElementById('kakao-logout-btn').setAttribute('style','display: none;');
document.getElementById('save_config').setAttribute('style','display: none;');
}
});
Kakao.Auth.createLoginButton({
container: '#kakao-login-btn',
size:'small',
success: function(authObj) {
location.reload();
},
fail: function(err) {
alert("로그인 실패!");
}
});
function logout(){
Kakao.Auth.logout(function () {
location.reload();
});
}
//]]>
</script>
</body>
</html>