강현태

DB 동기화 완료

......@@ -35,49 +35,56 @@
<DataType>text|0</DataType>
<NotNull>1</NotNull>
</column>
<key id="12" parent="4" name="PRIMARY">
<column id="12" parent="4" name="latest">
<Position>6</Position>
<DataType>int(11)|0</DataType>
<NotNull>1</NotNull>
<DefaultExpression>&apos;0&apos;</DefaultExpression>
</column>
<key id="13" parent="4" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>toon_index</ColNames>
<Primary>1</Primary>
</key>
<column id="13" parent="5" name="id">
<column id="14" parent="5" name="id">
<Position>1</Position>
<DataType>bigint(20)|0</DataType>
<NotNull>1</NotNull>
</column>
<key id="14" parent="5" name="PRIMARY">
<key id="15" parent="5" name="PRIMARY">
<NameSurrogate>1</NameSurrogate>
<ColNames>id</ColNames>
<Primary>1</Primary>
</key>
<column id="15" parent="6" name="user_id">
<column id="16" parent="6" name="user_id">
<Position>1</Position>
<DataType>bigint(20)|0</DataType>
<NotNull>1</NotNull>
</column>
<column id="16" parent="6" name="toon_index">
<column id="17" parent="6" name="toon_index">
<Position>2</Position>
<DataType>int(11)|0</DataType>
<NotNull>1</NotNull>
</column>
<column id="17" parent="6" name="recent">
<column id="18" parent="6" name="last">
<Position>3</Position>
<DataType>text|0</DataType>
<DataType>int(11)|0</DataType>
<NotNull>1</NotNull>
<DefaultExpression>&apos;0&apos;</DefaultExpression>
</column>
<index id="18" parent="6" name="toon_index">
<index id="19" parent="6" name="toon_index">
<ColNames>toon_index</ColNames>
</index>
<index id="19" parent="6" name="user_id">
<index id="20" parent="6" name="user_id">
<ColNames>user_id</ColNames>
</index>
<foreign-key id="20" parent="6" name="user_toon_relation_ibfk_1">
<foreign-key id="21" parent="6" name="user_toon_relation_ibfk_1">
<ColNames>user_id</ColNames>
<RefSchemaName>YTMT</RefSchemaName>
<RefTableName>user</RefTableName>
<RefColNames>id</RefColNames>
</foreign-key>
<foreign-key id="21" parent="6" name="user_toon_relation_ibfk_2">
<foreign-key id="22" parent="6" name="user_toon_relation_ibfk_2">
<ColNames>toon_index</ColNames>
<RefSchemaName>YTMT</RefSchemaName>
<RefTableName>toon</RefTableName>
......
......@@ -2,13 +2,17 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ffe1a490-8fdb-4611-8537-4d1c03c40b8d" name="Default" comment="">
<change type="DELETED" beforePath="$PROJECT_DIR$/npm-debug.log" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/dataSources/01265fc0-37d6-481f-ac14-42262cda0ac3.xml" afterPath="$PROJECT_DIR$/.idea/dataSources/01265fc0-37d6-481f-ac14-42262cda0ac3.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/app.js" afterPath="$PROJECT_DIR$/app.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/node_modules/async/package.json" afterPath="$PROJECT_DIR$/node_modules/async/package.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/package.json" afterPath="$PROJECT_DIR$/package.json" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/index.js" afterPath="$PROJECT_DIR$/routes/index.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/mytoons.js" afterPath="$PROJECT_DIR$/routes/mytoons.js" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/views/index.ejs" afterPath="$PROJECT_DIR$/views/index.ejs" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/views/mytoons.ejs" afterPath="$PROJECT_DIR$/views/mytoons.ejs" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/views/setting.ejs" afterPath="$PROJECT_DIR$/views/setting.ejs" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
......@@ -59,77 +63,31 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<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="473">
<caret line="100" column="29" lean-forward="false" selection-start-line="100" selection-start-column="29" selection-end-line="100" selection-end-column="29" />
<folding>
<element signature="e#1630#1674#0" expanded="false" />
<element signature="n#!!block;n#getAllToons#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
</file>
<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="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="package.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="29" lean-forward="false" selection-start-line="12" selection-start-column="29" selection-end-line="12" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="app.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455">
<caret line="49" column="26" lean-forward="false" selection-start-line="49" selection-start-column="13" selection-end-line="49" selection-end-column="27" />
<folding>
<element signature="e#1746#1818#0" expanded="false" />
<element signature="e#1877#2123#0" expanded="false" />
</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="480">
<caret line="32" column="0" lean-forward="false" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
<state relative-caret-position="359">
<caret line="25" column="15" lean-forward="false" selection-start-line="25" selection-start-column="15" selection-end-line="25" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="setting.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/routes/setting.js">
<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="45">
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<state relative-caret-position="182">
<caret line="19" column="17" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="setting.ejs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/views/setting.ejs">
<file leaf-file-name="mytoons.ejs" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="4" lean-forward="false" selection-start-line="16" selection-start-column="4" selection-end-line="16" selection-end-column="4" />
<state relative-caret-position="165">
<caret line="11" column="37" lean-forward="true" selection-start-line="11" selection-start-column="37" selection-end-line="11" selection-end-column="37" />
<folding />
</state>
</provider>
......@@ -149,12 +107,16 @@
<findStrings>
<find>mytoon</find>
<find>list</find>
<find>connection</find>
<find>authen</find>
<find>connection.</find>
<find>connection.end</find>
<find>connection.connect()</find>
<find>login</find>
<find>done(</find>
<find>user_id</find>
<find>quer</find>
<find>connection</find>
<find>user</find>
</findStrings>
<dirStrings>
<dir>$PROJECT_DIR$/views</dir>
......@@ -183,18 +145,18 @@
<option value="$PROJECT_DIR$/routes/users.js" />
<option value="$PROJECT_DIR$/views/login.html" />
<option value="$PROJECT_DIR$/public/javascripts/kakao.js" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$PROJECT_DIR$/views/index.ejs" />
<option value="$PROJECT_DIR$/views/mytoons.ejs" />
<option value="$PROJECT_DIR$/views/setting.html" />
<option value="$APPLICATION_CONFIG_DIR$/consoles/db/01265fc0-37d6-481f-ac14-42262cda0ac3/console.sql" />
<option value="$PROJECT_DIR$/views/setting.ejs" />
<option value="$PROJECT_DIR$/routes/setting.js" />
<option value="$PROJECT_DIR$/config/passport.js" />
<option value="$PROJECT_DIR$/models/user.js" />
<option value="$PROJECT_DIR$/routes/mytoons.js" />
<option value="$PROJECT_DIR$/routes/index.js" />
<option value="$PROJECT_DIR$/app.js" />
<option value="$PROJECT_DIR$/views/setting.ejs" />
<option value="$PROJECT_DIR$/views/index.ejs" />
<option value="$PROJECT_DIR$/routes/index.js" />
<option value="$PROJECT_DIR$/package.json" />
<option value="$APPLICATION_CONFIG_DIR$/consoles/db/01265fc0-37d6-481f-ac14-42262cda0ac3/console.sql" />
<option value="$PROJECT_DIR$/routes/mytoons.js" />
<option value="$PROJECT_DIR$/views/mytoons.ejs" />
</list>
</option>
</component>
......@@ -376,7 +338,7 @@
<option name="presentableId" value="Default" />
<updated>1512173581551</updated>
<workItem from="1512173589576" duration="1873000" />
<workItem from="1512179289398" duration="93162000" />
<workItem from="1512179289398" duration="112128000" />
</task>
<task id="LOCAL-00001" summary="초기 commit by intellij">
<created>1512174269218</created>
......@@ -396,7 +358,7 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="95035000" />
<option name="totallyTimeSpent" value="114001000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="0" width="1440" height="900" extended-state="6" />
......@@ -417,7 +379,7 @@
<window_info id="Database Console" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.329602" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
<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.3297568" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.3297568" 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.329602" 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.24964234" 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" />
......@@ -501,7 +463,7 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<option name="time" value="55" />
<option name="time" value="138" />
</breakpoint-manager>
<watches-manager />
</component>
......@@ -527,7 +489,7 @@
<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>
<marker date="1512410780745" expanded="true" signature="211:962" ph="..." />
<marker date="1512528857495" expanded="true" signature="211:995" ph="..." />
</folding>
</state>
</provider>
......@@ -620,44 +582,58 @@
</state>
</provider>
</entry>
<entry file="das://table:/9e6ed7fb/01265fc0-37d6-481f-ac14-42262cda0ac3/YTMT.user">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
<entry file="file://$PROJECT_DIR$/views/error.ejs">
<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://$APPLICATION_CONFIG_DIR$/consoles/db/01265fc0-37d6-481f-ac14-42262cda0ac3/console.sql">
<entry file="file://$PROJECT_DIR$/config/passport.js">
<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="73" />
<state relative-caret-position="150">
<caret line="10" column="11" lean-forward="false" selection-start-line="10" selection-start-column="11" selection-end-line="10" selection-end-column="11" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/error.ejs">
<entry file="file://$PROJECT_DIR$/models/user.js">
<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" />
<state relative-caret-position="75">
<caret line="5" column="20" lean-forward="false" selection-start-line="5" selection-start-column="20" selection-end-line="5" selection-end-column="20" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
<entry file="file://$PROJECT_DIR$/routes/users.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="120">
<caret line="8" column="0" lean-forward="false" selection-start-line="8" selection-start-column="0" selection-end-line="8" selection-end-column="0" />
<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$/views/setting.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="645">
<caret line="43" column="9" lean-forward="false" selection-start-line="43" selection-start-column="9" selection-end-line="43" selection-end-column="9" />
<folding>
<marker date="1512410780745" expanded="true" signature="211:962" ph="..." />
</folding>
<state relative-caret-position="207">
<caret line="14" column="23" lean-forward="false" selection-start-line="14" selection-start-column="23" selection-end-line="14" selection-end-column="23" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/setting.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="105">
<caret line="7" column="8" lean-forward="false" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="das://table:/9e6ed7fb/01265fc0-37d6-481f-ac14-42262cda0ac3/YTMT.user_toon_relation">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
......@@ -668,81 +644,79 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/config/passport.js">
<entry file="file://$PROJECT_DIR$/views/index.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="150">
<caret line="10" column="11" lean-forward="false" selection-start-line="10" selection-start-column="11" selection-end-line="10" selection-end-column="11" />
<folding />
<state relative-caret-position="400">
<caret line="28" column="42" lean-forward="false" selection-start-line="28" selection-start-column="42" selection-end-line="28" selection-end-column="42" />
<folding>
<marker date="1512528857495" expanded="true" signature="211:995" ph="..." />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/models/user.js">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="75">
<caret line="5" column="20" lean-forward="false" selection-start-line="5" selection-start-column="20" selection-end-line="5" selection-end-column="20" />
<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/setting.ejs">
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="240">
<caret line="16" column="4" lean-forward="false" selection-start-line="16" selection-start-column="4" selection-end-line="16" selection-end-column="4" />
<folding />
<state relative-caret-position="-206">
<caret line="24" column="0" lean-forward="false" selection-start-line="24" selection-start-column="0" selection-end-line="24" selection-end-column="0" />
<folding>
<element signature="e#1750#1822#0" expanded="false" />
<element signature="e#1881#2127#0" expanded="false" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/mytoons.js">
<entry file="file://$APPLICATION_CONFIG_DIR$/consoles/db/01265fc0-37d6-481f-ac14-42262cda0ac3/console.sql">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="480">
<caret line="32" column="0" lean-forward="false" selection-start-line="32" selection-start-column="0" selection-end-line="32" selection-end-column="0" />
<state relative-caret-position="0">
<caret line="0" column="161" lean-forward="false" selection-start-line="0" selection-start-column="161" selection-end-line="0" selection-end-column="161" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/setting.js">
<entry file="file://$PROJECT_DIR$/node_modules/async/dist/async.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="45">
<caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<state relative-caret-position="171">
<caret line="954" column="0" lean-forward="false" selection-start-line="954" selection-start-column="0" selection-end-line="954" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/users.js">
<provider selected="true" editor-type-id="text-editor">
<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 />
<entry file="das://table:/9e6ed7fb/01265fc0-37d6-481f-ac14-42262cda0ac3/YTMT.user">
<provider selected="true" editor-type-id="com.intellij.database.editor.DatabaseTableFileEditorProvider">
<state>
<filtering enabled="true" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<entry file="file://$PROJECT_DIR$/routes/mytoons.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="180">
<caret line="12" column="29" lean-forward="false" selection-start-line="12" selection-start-column="29" selection-end-line="12" selection-end-column="29" />
<state relative-caret-position="359">
<caret line="25" column="15" lean-forward="false" selection-start-line="25" selection-start-column="15" selection-end-line="25" selection-end-column="15" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/index.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
<caret line="100" column="29" lean-forward="false" selection-start-line="100" selection-start-column="29" selection-end-line="100" selection-end-column="29" />
<folding>
<element signature="e#1630#1674#0" expanded="false" />
<element signature="n#!!block;n#getAllToons#0" expanded="false" />
</folding>
<state relative-caret-position="182">
<caret line="19" column="17" lean-forward="false" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="17" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app.js">
<entry file="file://$PROJECT_DIR$/views/mytoons.ejs">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="455">
<caret line="49" column="26" lean-forward="false" selection-start-line="49" selection-start-column="13" selection-end-line="49" selection-end-column="27" />
<folding>
<element signature="e#1746#1818#0" expanded="false" />
<element signature="e#1877#2123#0" expanded="false" />
</folding>
<state relative-caret-position="165">
<caret line="11" column="37" lean-forward="true" selection-start-line="11" selection-start-column="37" selection-end-line="11" selection-end-column="37" />
<folding />
</state>
</provider>
</entry>
......
......@@ -16,12 +16,12 @@ var setting = require('./routes/setting');
var session = require('express-session');
passport.serializeUser(function(user, done) {
console.log('serialize');
console.log('serialized');
done(null, user);
});
passport.deserializeUser(function(obj, done) {
console.log('deserialize');
done(null, obj);
passport.deserializeUser(function(user, done) {
console.log('deserialized');
done(null, user);
});
var app = express();
......
......@@ -2,18 +2,18 @@
"_args": [
[
{
"raw": "async@^2.0.1",
"raw": "async",
"scope": null,
"escapedName": "async",
"name": "async",
"rawSpec": "^2.0.1",
"spec": ">=2.0.1 <3.0.0",
"type": "range"
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"/Users/kanghyeontae/IdeaProjects/YTMT/node_modules/form-data"
"/Users/kanghyeontae/IdeaProjects/YTMT"
]
],
"_from": "async@>=2.0.1 <3.0.0",
"_from": "async@latest",
"_id": "async@2.6.0",
"_inCache": true,
"_location": "/async",
......@@ -29,22 +29,24 @@
"_npmVersion": "5.5.1",
"_phantomChildren": {},
"_requested": {
"raw": "async@^2.0.1",
"raw": "async",
"scope": null,
"escapedName": "async",
"name": "async",
"rawSpec": "^2.0.1",
"spec": ">=2.0.1 <3.0.0",
"type": "range"
"rawSpec": "",
"spec": "latest",
"type": "tag"
},
"_requiredBy": [
"/form-data"
"#USER",
"/",
"/phantomjs/form-data"
],
"_resolved": "https://registry.npmjs.org/async/-/async-2.6.0.tgz",
"_shasum": "61a29abb6fcc026fea77e56d1c6ec53a795951f4",
"_shrinkwrap": null,
"_spec": "async@^2.0.1",
"_where": "/Users/kanghyeontae/IdeaProjects/YTMT/node_modules/form-data",
"_spec": "async",
"_where": "/Users/kanghyeontae/IdeaProjects/YTMT",
"author": {
"name": "Caolan McMahon"
},
......
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node',
1 verbose cli '/usr/local/bin/npm',
1 verbose cli 'install',
1 verbose cli 'cookieSession',
1 verbose cli '--save' ]
2 info using npm@3.10.10
3 info using node@v6.11.4
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData cookieSession
8 silly fetchNamedPackageData cookieSession
9 silly mapToRegistry name cookieSession
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'cookieSession',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: 'cookieSession',
12 silly mapToRegistry name: 'cookieSession',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag' }
13 silly mapToRegistry uri https://registry.npmjs.org/cookieSession
14 verbose request uri https://registry.npmjs.org/cookieSession
15 verbose request no auth needed
16 info attempt registry request try #1 at 10:46:34 PM
17 verbose request id 6a301e79ad3ee39e
18 http request GET https://registry.npmjs.org/cookieSession
19 http 404 https://registry.npmjs.org/cookieSession
20 verbose headers { 'content-type': 'application/json',
20 verbose headers 'cache-control': 'max-age=0',
20 verbose headers 'content-length': '2',
20 verbose headers 'accept-ranges': 'bytes',
20 verbose headers date: 'Tue, 05 Dec 2017 13:46:36 GMT',
20 verbose headers via: '1.1 varnish',
20 verbose headers connection: 'keep-alive',
20 verbose headers 'x-served-by': 'cache-nrt6151-NRT',
20 verbose headers 'x-cache': 'MISS',
20 verbose headers 'x-cache-hits': '0',
20 verbose headers 'x-timer': 'S1512481595.892739,VS0,VE1380',
20 verbose headers vary: 'Accept-Encoding' }
21 silly get cb [ 404,
21 silly get { 'content-type': 'application/json',
21 silly get 'cache-control': 'max-age=0',
21 silly get 'content-length': '2',
21 silly get 'accept-ranges': 'bytes',
21 silly get date: 'Tue, 05 Dec 2017 13:46:36 GMT',
21 silly get via: '1.1 varnish',
21 silly get connection: 'keep-alive',
21 silly get 'x-served-by': 'cache-nrt6151-NRT',
21 silly get 'x-cache': 'MISS',
21 silly get 'x-cache-hits': '0',
21 silly get 'x-timer': 'S1512481595.892739,VS0,VE1380',
21 silly get vary: 'Accept-Encoding' } ]
22 silly fetchPackageMetaData Error: Registry returned 404 for GET on https://registry.npmjs.org/cookieSession
22 silly fetchPackageMetaData at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:302:12)
22 silly fetchPackageMetaData at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:280:14)
22 silly fetchPackageMetaData at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:210:14)
22 silly fetchPackageMetaData at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:187:22)
22 silly fetchPackageMetaData at emitTwo (events.js:106:13)
22 silly fetchPackageMetaData at Request.emit (events.js:191:7)
22 silly fetchPackageMetaData at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1048:10)
22 silly fetchPackageMetaData at emitOne (events.js:96:13)
22 silly fetchPackageMetaData at Request.emit (events.js:188:7)
22 silly fetchPackageMetaData at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:969:12)
22 silly fetchPackageMetaData error for cookieSession { Error: Registry returned 404 for GET on https://registry.npmjs.org/cookieSession
22 silly fetchPackageMetaData at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:302:12)
22 silly fetchPackageMetaData at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:280:14)
22 silly fetchPackageMetaData at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:210:14)
22 silly fetchPackageMetaData at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:187:22)
22 silly fetchPackageMetaData at emitTwo (events.js:106:13)
22 silly fetchPackageMetaData at Request.emit (events.js:191:7)
22 silly fetchPackageMetaData at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1048:10)
22 silly fetchPackageMetaData at emitOne (events.js:96:13)
22 silly fetchPackageMetaData at Request.emit (events.js:188:7)
22 silly fetchPackageMetaData at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:969:12) pkgid: 'cookieSession', statusCode: 404, code: 'E404' }
23 silly rollbackFailedOptional Starting
24 silly rollbackFailedOptional Finishing
25 silly runTopLevelLifecycles Finishing
26 silly install printInstalled
27 verbose stack Error: Registry returned 404 for GET on https://registry.npmjs.org/cookieSession
27 verbose stack at makeError (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:302:12)
27 verbose stack at CachingRegistryClient.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:280:14)
27 verbose stack at Request._callback (/usr/local/lib/node_modules/npm/node_modules/npm-registry-client/lib/request.js:210:14)
27 verbose stack at Request.self.callback (/usr/local/lib/node_modules/npm/node_modules/request/request.js:187:22)
27 verbose stack at emitTwo (events.js:106:13)
27 verbose stack at Request.emit (events.js:191:7)
27 verbose stack at Request.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:1048:10)
27 verbose stack at emitOne (events.js:96:13)
27 verbose stack at Request.emit (events.js:188:7)
27 verbose stack at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/request.js:969:12)
28 verbose statusCode 404
29 verbose pkgid cookieSession
30 verbose cwd /Users/kanghyeontae/IdeaProjects/YTMT
31 error Darwin 17.2.0
32 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "cookieSession" "--save"
33 error node v6.11.4
34 error npm v3.10.10
35 error code E404
36 error 404 Registry returned 404 for GET on https://registry.npmjs.org/cookieSession
37 error 404
38 error 404 'cookieSession' is not in the npm registry.
39 error 404 Your package name is not valid, because
40 error 404 1. name can no longer contain capital letters
41 error 404 Note that you can also install from a
42 error 404 tarball, folder, http url, or git url.
43 verbose exit [ 1, true ]
......@@ -6,6 +6,7 @@
"start": "node ./bin/www"
},
"dependencies": {
"async": "^2.6.0",
"bcrypt-nodejs": "0.0.3",
"body-parser": "~1.18.2",
"casperjs": "^1.1.4",
......
......@@ -17,8 +17,8 @@ passport.use(new KakaoStrategy({
console.log("(!)로그인 : " + profile._json.id+"("+profile._json.properties.nickname +")");
return done(null, {
'user_id': profile.auth_id,
'nickname': profile.auth_name
'user_id': profile._json.id,
'nickname': profile._json.properties.nickname
});
}
));
......
var express = require('express');
var cheerio = require('cheerio');
var request = require('request');
var async = require('async');
var router = express.Router();
updatedToons = getUpdatedToons();
function getUpdatedToons(){
function getUpdatedToons(cb){
var allToons = new Array();
var allToonsUrl = "http://comic.naver.com/webtoon/weekday.nhn";
request(allToonsUrl, function(err, res, html){
if(!err){
var $ = cheerio.load(html);
var p = Promise.resolve();
var eachs = $(".thumb").has('.ico_updt').next().each(function() {
p = p.then(function() {
var link = $(this);
var toonName = link.text();
var toonHref = link.attr('href');
$(".thumb").has('.ico_updt').next().each(function() {
var link = $(this);
var toonName = link.text();
var toonHref = link.attr('href');
allToons[toonName]=toonHref;
//connection.query("");
allToons[toonName] = toonHref;
//connection.query("");
});
});
p.then(function(){
cb(allToons);
});
}else{
console.log("업데이트 웹툰 못가져왔습니다.");
throw err;
}
});
return allToons;
}
function getMyToons(id){
var sql = "";
connection.query('SELECT * FROM user u, user_toon_relation ur WHERE u.id=ur.user_id && id=?;');
function getMyToons(id,cb){
var sqlquery = 'SELECT name, thum_link, webtoon_link, week, last FROM user u, user_toon_relation ur, toon t WHERE u.id=? && u.id=ur.user_id && t.toon_index=ur.toon_index;';
var mylist;
connection.query(sqlquery,id,function(err,rows,result){
if(!err){
mylist=rows;
cb(mylist);
}else{
console.log("내 웹툰 리스트 가져오는데 실패했습니다!");
throw err;
}
});
}
/* GET home page. */
router.get('/', function(req, res, next) {
res.render('mytoons',{
list : updatedToons
});
async.series(
[
function(callback){
getMyToons(req.user.user_id, function (mytoon_list) {
callback(null,mytoon_list);
});
},
function(callback){
getUpdatedToons(function (updated_list) {
callback(null,updated_list);
});
}
],
function(err, results){
console.log(results);
res.render('mytoons', {
mytoons: results[0],
updatedtoons: results[1]
});
}
);
});
module.exports = router;
\ No newline at end of file
......
......@@ -26,7 +26,7 @@
<% } %>
<td>
<a href="<%= A.webtoon_link %>">
<img src="<%= A.thum_link %>"/>
<img alt="img" width="83" height="90" src="<%= A.thum_link %>"/>
</a>
<%= A.name %>
</td>
......
......@@ -10,15 +10,16 @@
<p>추가한 리스트</p>
<a href="/auth/logout/kakao">로그아웃</a>
<a href="/setting">세팅</a>
<a href="/setting/">세팅</a>
</br>
<table>
<%
var current = "";
for(updated in list){
for(i=0;i<mytoons.length; i++){
%>
<%= updated + " : " + list[updated] %><br>
<%= mytoons[i].name + " : " + mytoons[i].week %><br>
<%
}
%>
......
......@@ -11,8 +11,8 @@
<%
var current = "";
for(toonName in list) {
var A = list[toonName];
for(toonName in mytoons) {
var A = mytoons[toonName];
%>
<%= A %></br>
<%
......