muse/src/utils/db.ts

12 lines
304 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';
import {Settings} from '../models';
export const sequelize = new Sequelize({
dialect: 'sqlite',
database: 'muse',
storage: path.join(DATA_DIR, 'db.sqlite'),
models: [Settings]
});