Browse Source

Add html history mode middleware

main
Haris Razis 4 years ago
parent
commit
12f142f901
  1. 222
      .idea/workspace.xml
  2. 5
      server/index.js

222
.idea/workspace.xml

@ -1,222 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="80e06aae-4dff-458a-b9ec-91597c82e21b" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/runConfigurations/Server_compose.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/runConfigurations/Server_compose.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="JavaScript File" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="JsBowerSettings">
<node-interpreter value="project" />
<bower-package value="" />
<bower.json value="" />
</component>
<component name="ProjectId" id="1lK0rqg7a2iS4FwRBhl05SLriO9" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="javascript.nodejs.core.library.configured.version" value="15.4.0" />
<property name="javascript.nodejs.core.library.typings.version" value="14.14.13" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/client" />
<property name="node.js.detected.package.eslint" value="true" />
<property name="node.js.detected.package.tslint" value="true" />
<property name="node.js.path.for.package.eslint" value="project" />
<property name="node.js.path.for.package.tslint" value="project" />
<property name="node.js.selected.package.eslint" value="(autodetect)" />
<property name="node.js.selected.package.tslint" value="(autodetect)" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="restartRequiresConfirmation" value="false" />
<property name="settings.editor.selected.configurable" value="Docker" />
<property name="ts.external.directory.path" value="$APPLICATION_HOME_DIR$/plugins/JavaScriptLanguage/jsLanguageServicesImpl/external" />
<property name="vue.rearranger.settings.migration" value="true" />
</component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/client" />
<recent name="$PROJECT_DIR$/web" />
<recent name="$PROJECT_DIR$/server" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$" />
<recent name="$PROJECT_DIR$/server" />
</key>
</component>
<component name="RunManager" selected="Docker.Server_compose">
<configuration default="true" type="js.build_tools.npm">
<package-json value="$PROJECT_DIR$/client/package.json" />
<command value="run" />
<scripts>
<script value="run" />
</scripts>
<node-interpreter value="project" />
<envs />
<method v="2" />
</configuration>
<list>
<item itemvalue="Docker.Server_compose" />
<item itemvalue="npm.run client" />
<item itemvalue="npm.run server" />
<item itemvalue="npm.dev server" />
<item itemvalue="npm.dev client" />
</list>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="SvnConfiguration">
<configuration>$USER_HOME$/.subversion</configuration>
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="80e06aae-4dff-458a-b9ec-91597c82e21b" name="Default Changelist" comment="" />
<created>1607330678524</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1607330678524</updated>
<workItem from="1607330681789" duration="250000" />
<workItem from="1607330976779" duration="6619000" />
<workItem from="1607343316401" duration="9797000" />
<workItem from="1607440025839" duration="5569000" />
<workItem from="1607786722191" duration="706000" />
<workItem from="1607799462544" duration="4751000" />
<workItem from="1607859056050" duration="4042000" />
<workItem from="1607880047378" duration="8064000" />
<workItem from="1607929943703" duration="6396000" />
<workItem from="1607946537993" duration="1938000" />
<workItem from="1607959467413" duration="7534000" />
<workItem from="1608036003572" duration="51000" />
<workItem from="1608036062915" duration="6996000" />
<workItem from="1608103894068" duration="7021000" />
<workItem from="1608113416217" duration="1073000" />
<workItem from="1608199795160" duration="221000" />
<workItem from="1608205337913" duration="1669000" />
<workItem from="1608214880121" duration="7608000" />
<workItem from="1608281705559" duration="4406000" />
<workItem from="1608288996468" duration="516000" />
</task>
<task id="LOCAL-00001" summary="📜 Update README.md">
<created>1607333101556</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1607333101556</updated>
</task>
<task id="LOCAL-00002" summary="➕ Run npm init">
<created>1607333184753</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1607333184753</updated>
</task>
<task id="LOCAL-00003" summary="➕ Add run configurations">
<created>1607333266494</created>
<option name="number" value="00003" />
<option name="presentableId" value="LOCAL-00003" />
<option name="project" value="LOCAL" />
<updated>1607333266494</updated>
</task>
<task id="LOCAL-00004" summary="➕ Add db_conn.js">
<created>1607444514615</created>
<option name="number" value="00004" />
<option name="presentableId" value="LOCAL-00004" />
<option name="project" value="LOCAL" />
<updated>1607444514615</updated>
</task>
<task id="LOCAL-00005" summary="➕ Add routes">
<created>1607444608567</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1607444608567</updated>
</task>
<task id="LOCAL-00006" summary="➕ Add bin">
<created>1607444667309</created>
<option name="number" value="00006" />
<option name="presentableId" value="LOCAL-00006" />
<option name="project" value="LOCAL" />
<updated>1607444667309</updated>
</task>
<task id="LOCAL-00007" summary="➕ Add packages">
<created>1607444744411</created>
<option name="number" value="00007" />
<option name="presentableId" value="LOCAL-00007" />
<option name="project" value="LOCAL" />
<updated>1607444744411</updated>
</task>
<task id="LOCAL-00008" summary="➕ Add influx actions">
<created>1607444787471</created>
<option name="number" value="00008" />
<option name="presentableId" value="LOCAL-00008" />
<option name="project" value="LOCAL" />
<updated>1607444787471</updated>
</task>
<task id="LOCAL-00009" summary="➕ Add docker-compose">
<created>1607937746078</created>
<option name="number" value="00009" />
<option name="presentableId" value="LOCAL-00009" />
<option name="project" value="LOCAL" />
<updated>1607937746078</updated>
</task>
<option name="localTasksCounter" value="10" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="VcsManagerConfiguration">
<option name="CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT" value="true" />
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<MESSAGE value=" Update README.md" />
<MESSAGE value="➕ Run npm init" />
<MESSAGE value="➕ Add run configurations" />
<MESSAGE value="➕ Add db_conn.js" />
<MESSAGE value="➕ Add routes" />
<MESSAGE value="➕ Add bin" />
<MESSAGE value="➕ Add packages" />
<MESSAGE value="➕ Add influx actions" />
<MESSAGE value="➕ Add docker-compose" />
<option name="LAST_COMMIT_MESSAGE" value="➕ Add docker-compose" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="true" />
<option name="REARRANGE_BEFORE_PROJECT_COMMIT" value="true" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />
<select />
</component>
</project>

5
server/index.js

@ -3,6 +3,7 @@ const server = require('http').createServer(app);
const bodyParser = require('body-parser');
const chalk = require('chalk')
const cors = require('cors')
const history = require('connect-history-api-fallback');
require('./services/socket')(server);
require('./connections/mongo_conn');
@ -37,5 +38,9 @@ app.use(passport.session(undefined));
app.use(dataRoute)
app.use(authRoute)
app.use(history({
verbose: true
}));
const PORT = process.env.PORT || 8000;
server.listen(PORT, () => console.log(chalk.green.bold(`Server listening on port ${PORT}!`)));

Loading…
Cancel
Save