diff --git a/index.js b/index.js index 5b8590f..c44b28d 100644 --- a/index.js +++ b/index.js @@ -22,8 +22,10 @@ function logDbError(label) { }; } +var dbPath = process.env.PACOSAKO_DB || process.argv[3] || './pacosako.db'; + const dbInit = (async function dbInit() { - const db = await sqlite3.openAsync('./pacosako.db'); + const db = await sqlite3.openAsync(dbPath); try { await db.runAsync(`VACUUM`);