muse/src/utils/db.ts
2021-11-18 20:55:57 -05:00

12 lines
410 B
TypeScript

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