diff options
author | EuAndreh <eu@euandre.org> | 2023-11-27 08:15:49 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2023-11-27 08:15:49 -0300 |
commit | f1923553281a2f6d0495c7ee2b41283bdb68935b (patch) | |
tree | 0e2ba50ffee15b22e9977da0c8a0f0d697c5ef69 | |
parent | src/config.h.in: Add provenance links and explanation for _XOPEN_SOURCE and _... (diff) | |
download | papod-f1923553281a2f6d0495c7ee2b41283bdb68935b.tar.gz papod-f1923553281a2f6d0495c7ee2b41283bdb68935b.tar.xz |
src/db.js: Inline fallback definition of $PAPO_DB_PATH
-rw-r--r-- | .envrc | 3 | ||||
-rw-r--r-- | src/db.js | 2 |
2 files changed, 1 insertions, 4 deletions
@@ -1,3 +0,0 @@ -#!/bin/sh - -export PAPO_DB_PATH=':memory:' @@ -9,7 +9,7 @@ const MIGRATIONS_DIR = __dirname + "/sql/migrations/"; const MIGRATION_FILENAMES = fs.readdirSync(MIGRATIONS_DIR, "UTF-8"); let db = null; -const init = async (dbName = process.env.PAPO_DB_PATH) => { +const init = async (dbName = process.env.PAPO_DB_PATH || ":memory:") => { assert(dbName); db = await sqlite.open(dbName); |