1
0
Fork 0
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:
nvc8996 2021-07-29 18:22:48 +03:00
parent 86e7293c7a
commit e538a5edf8
5 changed files with 11 additions and 5 deletions

View file

@ -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,
});

View file

@ -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,
});

View file

@ -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,
});

View file

@ -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,
});

View file

@ -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,
});