trying to persist the db
This commit is contained in:
parent
29a6bd4d9a
commit
f28b4d58ec
@ -1,14 +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="">
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/codeStyleSettings.xml" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/routes/btc.js" />
|
||||
<change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/routes/temp.js" />
|
||||
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
|
||||
<list default="true" id="8a985735-5aff-47ce-a55f-2957d4f9c5f9" name="Default" comment="Initial Commit ">
|
||||
<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$/package.json" afterPath="$PROJECT_DIR$/package.json" />
|
||||
<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" />
|
||||
@ -34,7 +29,11 @@
|
||||
<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 />
|
||||
<folding>
|
||||
<marker date="1447026540000" expanded="true" signature="0:378" placeholder="{"name": "silvrapi"...}" />
|
||||
<marker date="1447026540000" expanded="true" signature="78:113" placeholder="{"start": "node ./bin/www"...}" />
|
||||
<marker date="1447026540000" expanded="true" signature="133:323" placeholder="{"body-parser": "~1.13.2"...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -92,8 +91,8 @@
|
||||
<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.6858974">
|
||||
<caret line="46" column="3" selection-start-line="46" selection-start-column="3" selection-end-line="46" selection-end-column="3" />
|
||||
<state vertical-scroll-proportion="-0.024038462">
|
||||
<caret line="8" column="17" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
@ -338,7 +337,25 @@
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1447023017687</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="2" />
|
||||
<task id="LOCAL-00002" summary="Initial Commit ">
|
||||
<created>1447030070358</created>
|
||||
<option name="number" value="00002" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1447030070358</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00003" summary="debugging">
|
||||
<created>1447055263421</created>
|
||||
<option name="number" value="00003" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1447055263421</updated>
|
||||
</task>
|
||||
<task id="LOCAL-00004" summary="closing db to persist ">
|
||||
<created>1447056652943</created>
|
||||
<option name="number" value="00004" />
|
||||
<option name="project" value="LOCAL" />
|
||||
<updated>1447056652943</updated>
|
||||
</task>
|
||||
<option name="localTasksCounter" value="5" />
|
||||
<servers />
|
||||
</component>
|
||||
<component name="ToolWindowManager">
|
||||
@ -370,8 +387,13 @@
|
||||
<option name="myLimit" value="2678400000" />
|
||||
</component>
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||
<option name="CHECK_CODE_CLEANUP_BEFORE_PROJECT_COMMIT" value="true" />
|
||||
<option name="CHECK_NEW_TODO" value="false" />
|
||||
<MESSAGE value="Initial Commit " />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="Initial Commit " />
|
||||
<MESSAGE value="debugging" />
|
||||
<MESSAGE value="closing db to persist " />
|
||||
<option name="LAST_COMMIT_MESSAGE" value="closing db to persist " />
|
||||
</component>
|
||||
<component name="XDebuggerManager">
|
||||
<breakpoint-manager />
|
||||
@ -382,7 +404,11 @@
|
||||
<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 />
|
||||
<folding>
|
||||
<marker date="1447026540000" expanded="true" signature="0:378" placeholder="{"name": "silvrapi"...}" />
|
||||
<marker date="1447026540000" expanded="true" signature="78:113" placeholder="{"start": "node ./bin/www"...}" />
|
||||
<marker date="1447026540000" expanded="true" signature="133:323" placeholder="{"body-parser": "~1.13.2"...}" />
|
||||
</folding>
|
||||
</state>
|
||||
</provider>
|
||||
</entry>
|
||||
@ -444,8 +470,8 @@
|
||||
</entry>
|
||||
<entry file="file://$PROJECT_DIR$/routes/temp.js">
|
||||
<provider selected="true" editor-type-id="text-editor">
|
||||
<state vertical-scroll-proportion="0.6858974">
|
||||
<caret line="46" column="3" selection-start-line="46" selection-start-column="3" selection-end-line="46" selection-end-column="3" />
|
||||
<state vertical-scroll-proportion="-0.024038462">
|
||||
<caret line="8" column="17" selection-start-line="8" selection-start-column="17" selection-end-line="8" selection-end-column="17" />
|
||||
<folding />
|
||||
</state>
|
||||
</provider>
|
||||
|
@ -1,11 +1,20 @@
|
||||
var express = require('express'), sqlite3 = require('sqlite3').verbose();
|
||||
var express = require('express'), fs = require('fs'), sqlite3 = require('sqlite3').verbose();
|
||||
var router = express.Router();
|
||||
|
||||
var temp_db;
|
||||
var file = "temp.sqlite3";
|
||||
var exists;
|
||||
/* GET users listing. */
|
||||
|
||||
function createDB() {
|
||||
console.log('Creating Temp db...');
|
||||
|
||||
if (!fs.existsSync(file)) {
|
||||
console.log('creating db file');
|
||||
fs.openSync(file,'w');
|
||||
}
|
||||
|
||||
|
||||
temp_db = new sqlite3.Database('temp.sqlite3', createTable);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user