muse/src/utils/db.ts
2020-03-16 19:37:54 -05:00

12 lines
324 B
TypeScript

import {Sequelize} from 'sequelize-typescript';
import path from 'path';
import {DATA_DIR} from '../utils/config';
import {Settings, Shortcut} from '../models';
export const sequelize = new Sequelize({
dialect: 'sqlite',
database: 'muse',
storage: path.join(DATA_DIR, 'db.sqlite'),
models: [Settings, Shortcut]
});