mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-10 16:05:32 +02:00
Use absolute paths for uploads and db
This commit is contained in:
parent
ce1f7db3d7
commit
ca403f3df3
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ app.use(morgan('dev'));
|
||||||
app.use(express.json());
|
app.use(express.json());
|
||||||
app.use(express.urlencoded({ extended: true }));
|
app.use(express.urlencoded({ extended: true }));
|
||||||
app.use(cookieParser());
|
app.use(cookieParser());
|
||||||
app.use(express.static(path.join(__dirname, '../../public')));
|
app.use(express.static(`${config.get('uploads')}`));
|
||||||
|
|
||||||
app.use('/', routes);
|
app.use('/', routes);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ import path from 'path';
|
||||||
*/
|
*/
|
||||||
export default function initDb(name: string): Datastore {
|
export default function initDb(name: string): Datastore {
|
||||||
return new Datastore({
|
return new Datastore({
|
||||||
filename: path.resolve(`./${config.get('database')}/${name}.db`),
|
filename: path.resolve(`${config.get('database')}/${name}.db`),
|
||||||
autoload: true,
|
autoload: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue