muse/src/utils/db.ts

13 lines
345 B
TypeScript
Raw Normal View History

2020-03-09 17:57:39 +01:00
import {Sequelize} from 'sequelize-typescript';
import path from 'path';
2021-09-20 01:50:25 +02:00
import {DATA_DIR} from '../services/config';
2020-03-17 01:37:54 +01:00
import {Settings, Shortcut} from '../models';
2020-03-09 17:57:39 +01:00
export const sequelize = new Sequelize({
dialect: 'sqlite',
database: 'muse',
storage: path.join(DATA_DIR, 'db.sqlite'),
2020-03-20 01:26:58 +01:00
models: [Settings, Shortcut],
logging: false
2020-03-09 17:57:39 +01:00
});