Skip to content

Commit 9c85e5c

Browse files
committed
Made SQLite database file location dynamic based on file locations
1 parent a09c4c2 commit 9c85e5c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Gruntfile.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//require('./http-proxy')('<proxy-ip>',<proxy-port>);
33

44
var sqlite3 = require('sqlite3').verbose();
5-
var dbName = 'nest.db';
5+
var dbName = require('path').join(__dirname, 'nest.db');
66
var serverLocation = 'ssh://<ip-address>';
77

88
module.exports = function ( grunt ) {

server/server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ exports.openDB = openDB;
4343
exports.initDB = initDB;
4444

4545
app.configure(function () {
46-
openDB('nest.db');
46+
openDB(require('path').join(__dirname, '..', 'nest.db'));
4747
initDB(db);
4848
app.use(express.logger('dev')); /* 'default', 'short', 'tiny', 'dev' */
4949
app.use(express.bodyParser());

0 commit comments

Comments
 (0)