Permalink
Browse files

Allow specifying DB file as env variable

  • Loading branch information...
1 parent 5b03ae6 commit 497e24f027af86f1286b9df13817343db6f7ff9f @scy committed Feb 25, 2014
Showing with 2 additions and 1 deletion.
  1. +2 −1 coco-icalres.js
View
@@ -4,7 +4,8 @@
var icalevent = require('icalevent');
var sqlite3 = require('sqlite3').verbose();
-var db = new sqlite3.Database('resources.sqlite');
+var dbfile = ('dbfile' in process.env) ? process.env.dbfile : 'resources.sqlite';
+var db = new sqlite3.Database(dbfile);
var user = process.argv[2];
var uidUser = user.replace(/[^a-zA-Z]/g, '');

0 comments on commit 497e24f

Please sign in to comment.