muse/src/utils/db.ts

12 lines
324 B
TypeScript
Raw Normal View History

2020-03-09 17:57:39 +01:00
import {Sequelize} from 'sequelize-typescript';
import path from 'path';
import {DATA_DIR} from '../utils/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-17 01:37:54 +01:00
models: [Settings, Shortcut]
2020-03-09 17:57:39 +01:00
});