add a get route

This commit is contained in:
martind2000 2016-01-18 00:19:26 +00:00
parent 180f4b8ed3
commit f3a0164b33
2 changed files with 64 additions and 38 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="8a985735-5aff-47ce-a55f-2957d4f9c5f9" name="Default" comment="Turn off all routes but time">
<list default="true" id="8a985735-5aff-47ce-a55f-2957d4f9c5f9" name="Default" comment="add a get route&#10;">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/routes/temp.js" afterPath="$PROJECT_DIR$/routes/temp.js" />
</list>
@ -44,16 +44,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="angular.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/lib/angular.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="jquery.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/public/lib/jquery.js">
<provider selected="true" editor-type-id="text-editor">
@ -77,8 +67,18 @@
<file leaf-file-name="temp.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/routes/temp.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.6875">
<caret line="90" column="27" selection-start-line="90" selection-start-column="27" selection-end-line="90" selection-end-column="27" />
<state vertical-scroll-proportion="0.37413073">
<caret line="89" column="45" selection-start-line="89" selection-start-column="45" selection-end-line="89" selection-end-column="45" />
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="time.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/routes/time.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-12.222222">
<caret line="22" column="58" selection-start-line="22" selection-start-column="58" selection-end-line="22" selection-end-column="58" />
<folding />
</state>
</provider>
@ -98,7 +98,7 @@
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="37" column="10" selection-start-line="37" selection-start-column="10" selection-end-line="37" selection-end-column="10" />
<caret line="37" column="12" selection-start-line="37" selection-start-column="12" selection-end-line="37" selection-end-column="12" />
<folding />
</state>
</provider>
@ -141,7 +141,6 @@
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/bin/www" />
<option value="$PROJECT_DIR$/routes/time.js" />
<option value="$PROJECT_DIR$/routes/index.js" />
<option value="$PROJECT_DIR$/routes/btc.js" />
<option value="$PROJECT_DIR$/public/javascripts/temp.js" />
@ -150,6 +149,7 @@
<option value="$PROJECT_DIR$/views/weight.ejs" />
<option value="$PROJECT_DIR$/routes/weight.js" />
<option value="$PROJECT_DIR$/app.js" />
<option value="$PROJECT_DIR$/routes/time.js" />
<option value="$PROJECT_DIR$/routes/temp.js" />
</list>
</option>
@ -436,7 +436,31 @@
<option name="project" value="LOCAL" />
<updated>1452158050549</updated>
</task>
<option name="localTasksCounter" value="16" />
<task id="LOCAL-00016" summary="add a get route&#10;">
<created>1453070661396</created>
<option name="number" value="00016" />
<option name="project" value="LOCAL" />
<updated>1453070661396</updated>
</task>
<task id="LOCAL-00017" summary="add a get route&#10;">
<created>1453070955976</created>
<option name="number" value="00017" />
<option name="project" value="LOCAL" />
<updated>1453070955976</updated>
</task>
<task id="LOCAL-00018" summary="add a get route&#10;">
<created>1453075137511</created>
<option name="number" value="00018" />
<option name="project" value="LOCAL" />
<updated>1453075137511</updated>
</task>
<task id="LOCAL-00019" summary="add a get route&#10;">
<created>1453076121936</created>
<option name="number" value="00019" />
<option name="project" value="LOCAL" />
<updated>1453076121936</updated>
</task>
<option name="localTasksCounter" value="20" />
<servers />
</component>
<component name="ToolWindowManager">
@ -446,16 +470,16 @@
<window_info id="Remote Host" 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="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.23931624" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<window_info id="TODO" 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="6" side_tool="false" content_ui="tabs" />
<window_info id="Messages" 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="7" side_tool="false" content_ui="tabs" />
<window_info id="Event Log" 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="7" side_tool="true" content_ui="tabs" />
<window_info id="npm" 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="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1612554" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.16143012" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.17184265" sideWeight="0.5" order="2" 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="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32919255" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
<window_info id="Favorites" 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="true" content_ui="tabs" />
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39958593" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
<window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Messages" 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="7" side_tool="false" content_ui="tabs" />
<window_info id="Message" 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="0" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
<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" />
@ -487,7 +511,8 @@
<MESSAGE value="fixing broken server" />
<MESSAGE value="Turn off all routes but time" />
<MESSAGE value="back to normal" />
<option name="LAST_COMMIT_MESSAGE" value="back to normal" />
<MESSAGE value="add a get route&#10;" />
<option name="LAST_COMMIT_MESSAGE" value="add a get route&#10;" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -738,13 +763,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/time.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="5" column="23" selection-start-line="5" selection-start-column="1" selection-end-line="5" selection-end-column="23" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/index.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -815,14 +833,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="37" column="10" selection-start-line="37" selection-start-column="10" selection-end-line="37" selection-end-column="10" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/public/javascripts/temp.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -831,10 +841,26 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="37" column="12" selection-start-line="37" selection-start-column="12" selection-end-line="37" selection-end-column="12" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/time.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-12.222222">
<caret line="22" column="58" selection-start-line="22" selection-start-column="58" selection-end-line="22" selection-end-column="58" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/temp.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-0.6875">
<caret line="90" column="27" selection-start-line="90" selection-start-column="27" selection-end-line="90" selection-end-column="27" />
<state vertical-scroll-proportion="0.37413073">
<caret line="89" column="45" selection-start-line="89" selection-start-column="45" selection-end-line="89" selection-end-column="45" />
<folding />
</state>
</provider>

View File

@ -91,9 +91,9 @@ router.get('/:id', function(req, res, next) {
var id = req.params.id;
console.log('id: ' + id);
res.writeHead(200, {"ContentType": "application/json"});
res.writeHead(200, {"ContentType": "text/html"});
//res.send(JSON.stringify(t));
res.end(JSON.stringify({}));
res.end('ok');
});
router.get('/reading', function(req, res, next) {