node.js链接数据库方法(存

var Sequelize = require("sequelize");
process.env.TZ = 'Asia/Shanghai';
var sequelize = new Sequelize('rest', 'rootdata', 'xxxxxxx', {
	host: 'xxx.xx.xxx.xxx',
	port: '3306',
    dialect: "mysql",
    dialectOptions: {
        charset: 'utf8mb4'
    },
	pool: {
		max: 500,
		min: 0,
		idle: 10000
	},
    timezone: process.env.TZ
});


export {
	sequelize
};

node存档

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注