1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-07 14:35:26 +02:00

Use absolute paths for uploads and db

This commit is contained in:
n0str 2022-04-10 14:07:39 +03:00
parent ce1f7db3d7
commit ca403f3df3
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ app.use(morgan('dev'));
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
app.use(cookieParser());
app.use(express.static(path.join(__dirname, '../../public')));
app.use(express.static(`${config.get('uploads')}`));
app.use('/', routes);

View file

@ -10,7 +10,7 @@ import path from 'path';
*/
export default function initDb(name: string): Datastore {
return new Datastore({
filename: path.resolve(`./${config.get('database')}/${name}.db`),
filename: path.resolve(`${config.get('database')}/${name}.db`),
autoload: true,
});
}