📜  如何访问 db knex - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:34.853000             🧑  作者: Mango

代码示例1
const options = {
    client: 'mysql2',
    connection: {
        host: '127.0.0.1',
        user: 'user12',
        password: 's$cret',
        database: 'mydb'
    }
}
//These are the connection options for MySQL.
const knex = require('knex')(options);