muse/src/utils/db.ts
2021-09-19 19:50:25 -04:00

13 lines
345 B
TypeScript

import {Sequelize} from 'sequelize-typescript';
import path from 'path';
import {DATA_DIR} from '../services/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],
logging: false
});