0.0.3 • Published 11 months ago

sequelize-mysql-ssh v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Description

Here's the translation of your previous message:

  1. Sequelize uses cloneDeep in the configuration, which causes some stream to be unreadable.
  2. After initialization, Sequelize does not provide a method to pass stream during subsequent execution.

Therefore, we made some small changes to the Sequelize source code.

Install

Using npm:

npm install sequelize-mysql-ssh

Or using yarn:

yarn add sequelize-mysql-ssh

Usage

const config = {
  host: "", //数据库远程地址
  username: "", //数据库用户名
  database: "", //数据库
  password: "", //数据库密码
  dialect: "mysql",
  ssh: {
    host: "", //远程主机地址
    port: 22, //主机端口
    username: "", //主机用户名
    password: "", //主机密码
  },
};

const sequelize = new Sequelize(config);
sequelize.query("select * from table").then((data) => {
  console.log("=====>", data);
});

MIT License

Copyright (c) 2014-present Sequelize contributors