From 0d251b212e70864b6a2e3b1a3c5ac21f60c89992 Mon Sep 17 00:00:00 2001 From: mmcw-dev Date: Fri, 5 Jan 2018 17:31:00 -0500 Subject: [PATCH] Add path module to db to better format url? Why is database no longer writing? Move ip above list of wifi. List package.version in app server creation. --- app/www/index.html | 6 +++--- index.js | 2 +- lib/db/index.js | 4 +++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/www/index.html b/app/www/index.html index a37d3b6..be93128 100644 --- a/app/www/index.html +++ b/app/www/index.html @@ -75,14 +75,14 @@

WIFI

+
+ Local IP: null +
-
- Local IP: null -
diff --git a/index.js b/index.js index 61ad0d9..2937f23 100644 --- a/index.js +++ b/index.js @@ -15,7 +15,7 @@ const INDEXPATH = './app/www/index.html' let app = restify.createServer({ name: APPNAME, - version: '0.0.1' + version: PACKAGE.version }) let ble diff --git a/lib/db/index.js b/lib/db/index.js index b391538..22865d3 100644 --- a/lib/db/index.js +++ b/lib/db/index.js @@ -1,9 +1,11 @@ 'use strict' const os = require('os') +const path = require('path') const sqlite3 = require('sqlite3').verbose() const squel = require('squel') -const DB_FILE = os.homedir() + '/.intval3.db' + +const DB_FILE = path.join(os.homedir(), '.intval3.db') const db = new sqlite3.Database(DB_FILE) class DB {