mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-07 14:35:26 +02:00
use path.resolve for DB paths
This commit is contained in:
parent
86e7293c7a
commit
e538a5edf8
5 changed files with 11 additions and 5 deletions
|
@ -1,8 +1,9 @@
|
|||
import Datastore from 'nedb';
|
||||
import config from 'config';
|
||||
import path from 'path';
|
||||
|
||||
const db = new Datastore({
|
||||
filename: `./${config.get('database')}/aliases.db`,
|
||||
filename: path.resolve(`./${config.get('database')}/aliases.db`),
|
||||
autoload: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import Datastore from 'nedb';
|
||||
import config from 'config';
|
||||
import path from 'path';
|
||||
|
||||
const db = new Datastore({
|
||||
filename: `./${config.get('database')}/files.db`,
|
||||
filename: path.resolve(`./${config.get('database')}/files.db`),
|
||||
autoload: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import Datastore from 'nedb';
|
||||
import config from 'config';
|
||||
import path from 'path';
|
||||
|
||||
const db = new Datastore({
|
||||
filename: `./${config.get('database')}/pages.db`,
|
||||
filename: path.resolve(`./${config.get('database')}/pages.db`),
|
||||
autoload: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
import Datastore from 'nedb';
|
||||
import config from 'config';
|
||||
import path from 'path';
|
||||
|
||||
const db = new Datastore({
|
||||
filename: `./${config.get('database')}/pagesOrder.db`,
|
||||
filename: path.resolve(`./${config.get('database')}/pagesOrder.db`),
|
||||
autoload: true,
|
||||
});
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import Datastore from 'nedb';
|
||||
import config from 'config';
|
||||
import path from 'path';
|
||||
|
||||
const db = new Datastore({
|
||||
filename: `./${config.get('database')}/password.db`,
|
||||
filename: path.resolve(`./${config.get('database')}/password.db`),
|
||||
autoload: true,
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue