add a get route

This commit is contained in:
martind2000 2016-01-17 22:44:21 +00:00
parent df8409cb05
commit d6a710be63
2 changed files with 202 additions and 71 deletions

View File

@ -1,9 +1,9 @@
<?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="fixing broken server">
<list default="true" id="8a985735-5aff-47ce-a55f-2957d4f9c5f9" name="Default" comment="Turn off all routes but time">
<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$/routes/temp.js" afterPath="$PROJECT_DIR$/routes/temp.js" />
</list>
<ignored path="silvrapi.iws" />
<ignored path=".idea/workspace.xml" />
@ -27,8 +27,8 @@
<file leaf-file-name="temp.ejs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/views/temp.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="59" column="27" selection-start-line="0" selection-start-column="0" selection-end-line="92" selection-end-column="7" />
<state vertical-scroll-proportion="-37.5">
<caret line="60" column="29" selection-start-line="60" selection-start-column="29" selection-end-line="60" selection-end-column="29" />
<folding />
</state>
</provider>
@ -74,11 +74,11 @@
</provider>
</entry>
</file>
<file leaf-file-name="temp.js" pinned="false" current-in-tab="false">
<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="-80.68965">
<caret line="156" column="13" selection-start-line="156" selection-start-column="9" selection-end-line="156" selection-end-column="13" />
<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" />
<folding />
</state>
</provider>
@ -94,11 +94,21 @@
</provider>
</entry>
</file>
<file leaf-file-name="app.js" pinned="false" current-in-tab="true">
<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 vertical-scroll-proportion="0.7311978">
<caret line="35" column="2" selection-start-line="35" selection-start-column="2" selection-end-line="35" selection-end-column="2" />
<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>
</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 vertical-scroll-proportion="0.0">
<caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding />
</state>
</provider>
@ -114,16 +124,6 @@
</provider>
</entry>
</file>
<file leaf-file-name="index.ejs" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/views/index.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
</file>
</leaf>
</component>
<component name="FileTemplateManagerImpl">
@ -149,8 +149,8 @@
<option value="$PROJECT_DIR$/views/temp.ejs" />
<option value="$PROJECT_DIR$/views/weight.ejs" />
<option value="$PROJECT_DIR$/routes/weight.js" />
<option value="$PROJECT_DIR$/routes/temp.js" />
<option value="$PROJECT_DIR$/app.js" />
<option value="$PROJECT_DIR$/routes/temp.js" />
</list>
</option>
</component>
@ -166,9 +166,10 @@
<detection-done>true</detection-done>
</component>
<component name="ProjectFrameBounds">
<option name="x" value="640" />
<option name="width" value="1273" />
<option name="height" value="1058" />
<option name="x" value="-8" />
<option name="y" value="-8" />
<option name="width" value="1932" />
<option name="height" value="1056" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<OptionsSetting value="true" id="Add" />
@ -195,8 +196,6 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scratches" />
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<PATH>
@ -229,8 +228,24 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
<option name="myItemId" value="silvrapi" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="silvrapi" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
<option name="myItemId" value="public" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
</subPane>
</pane>
<pane id="Scope" />
<pane id="Scratches" />
</panes>
</component>
<component name="PropertiesComponent">
@ -245,6 +260,22 @@
<property name="JavaScriptPreferStrict" value="true" />
<property name="JavaScriptWeakerCompletionTypeGuess" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/bower.json" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth0" value="102" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder0" value="0" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth1" value="130" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder1" value="1" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth2" value="132" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder2" value="2" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatWidth3" value="806" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_flatOrder3" value="3" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth0" value="124" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder0" value="0" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth1" value="123" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder1" value="1" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth2" value="124" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder2" value="2" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeWidth3" value="799" />
<property name="FileHistory.git4idea.history.GitHistoryProvider_treeOrder3" value="3" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
@ -255,6 +286,9 @@
<configuration default="true" type="DartCommandLineRunConfigurationType" factoryName="Dart Command Line Application">
<method />
</configuration>
<configuration default="true" type="DartTestRunConfigurationType" factoryName="Dart Test">
<method />
</configuration>
<configuration default="true" type="JavaScriptTestRunnerKarma" factoryName="Karma" config-file="">
<envs />
<method />
@ -390,32 +424,44 @@
<option name="project" value="LOCAL" />
<updated>1452157788326</updated>
</task>
<option name="localTasksCounter" value="14" />
<task id="LOCAL-00014" summary="Turn off all routes but time">
<created>1452157827501</created>
<option name="number" value="00014" />
<option name="project" value="LOCAL" />
<updated>1452157827501</updated>
</task>
<task id="LOCAL-00015" summary="back to normal">
<created>1452158050549</created>
<option name="number" value="00015" />
<option name="project" value="LOCAL" />
<updated>1452158050549</updated>
</task>
<option name="localTasksCounter" value="16" />
<servers />
</component>
<component name="ToolWindowManager">
<frame x="640" y="0" width="1273" height="1058" extended-state="0" />
<frame x="-8" y="-8" width="1932" height="1056" extended-state="0" />
<editor active="false" />
<layout>
<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.23660347" sideWeight="0.5" order="0" 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.16216215" 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.1612554" 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" />
<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="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="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="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="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" />
</layout>
</component>
<component name="Vcs.Log.UiProperties">
@ -439,7 +485,9 @@
<MESSAGE value="trying to persist the db" />
<MESSAGE value="trying to persist the db again" />
<MESSAGE value="fixing broken server" />
<option name="LAST_COMMIT_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" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
@ -454,6 +502,86 @@
<watches-manager />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/views/temp.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="59" column="27" selection-start-line="0" selection-start-column="0" selection-end-line="92" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/weight.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="56" column="0" selection-start-line="56" selection-start-column="0" selection-end-line="56" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<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>
<entry file="file://$PROJECT_DIR$/public/lib/jquery.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>
<entry file="file://$PROJECT_DIR$/public/javascripts/temp.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>
<entry file="file://$PROJECT_DIR$/routes/temp.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="156" column="13" selection-start-line="156" selection-start-column="9" selection-end-line="156" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/weight.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="3" column="0" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
<folding />
</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="0" column="0" 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$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" 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 vertical-scroll-proportion="0.0">
<caret line="9" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="9" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/temp.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -522,7 +650,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
@ -594,15 +721,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<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>
@ -638,15 +756,6 @@
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="7" column="8" selection-start-line="7" selection-start-column="8" selection-end-line="7" selection-end-column="8" />
<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">
<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>
@ -666,14 +775,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/temp.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="59" column="27" selection-start-line="0" selection-start-column="0" selection-end-line="92" selection-end-column="7" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/weight.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -690,14 +791,6 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/temp.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-80.68965">
<caret line="156" column="13" selection-start-line="156" selection-start-column="9" selection-end-line="156" selection-end-column="13" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/routes/users.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
@ -706,10 +799,42 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.0">
<caret line="20" column="0" selection-start-line="20" selection-start-column="0" selection-end-line="20" selection-end-column="0" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/views/temp.ejs">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="-37.5">
<caret line="60" column="29" selection-start-line="60" selection-start-column="29" selection-end-line="60" selection-end-column="29" />
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/app.js">
<provider selected="true" editor-type-id="text-editor">
<state vertical-scroll-proportion="0.7311978">
<caret line="35" column="2" selection-start-line="35" selection-start-column="2" selection-end-line="35" selection-end-column="2" />
<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">
<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>
<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" />
<folding />
</state>
</provider>

View File

@ -83,6 +83,12 @@ router.get('/', function(req, res, next) {
});
router.get('/:id', function(req, res, next) {
var id = req.params.id;
console.log('id: ' + id);
});
router.get('/reading', function(req, res, next) {