123456789101112131415161718192021 |
- import { Sequelize } from 'sequelize';
- import { getDatabasePath } from '../preload/utils';
- // doc: https://sequelize.org/docs/v6/getting-started/
- const logging = () => {};
- // const logging =
- // process.env.NODE_ENV === "production" ? () => {} : (msg) => console.log(msg);
- const sequelize = new Sequelize({
- dialect: 'sqlite',
- storage: getDatabasePath(),
- logging,
- pool: {
- max: 20,
- min: 5,
- acquire: 100000,
- },
- });
- export default sequelize;
|