23 lines
490 B
JavaScript
23 lines
490 B
JavaScript
import { get_app_config } from './app_config.js';
|
|
|
|
export function get_sequelize_options() {
|
|
const cfg = get_app_config();
|
|
|
|
return {
|
|
host: cfg.mysql.host,
|
|
port: cfg.mysql.port,
|
|
username: cfg.mysql.user,
|
|
password: cfg.mysql.password,
|
|
database: cfg.mysql.database,
|
|
dialect: 'mysql',
|
|
logging: false,
|
|
define: {
|
|
underscored: true,
|
|
timestamps: true,
|
|
createdAt: 'created_at',
|
|
updatedAt: 'updated_at'
|
|
},
|
|
timezone: '+08:00'
|
|
};
|
|
}
|