蛋甲 安装 请参见。 $ npm i egg-oracle --save 用法 启用插件 // {app_root}/config/plugin.js exports . oracle = { enable : true , package : 'egg-oracle' , } ; 应用程序中的oracle连接池附加 // {app_root}/app/service/my_service.js 'use strict' ; const Service = require ( 'egg' ) . Service ; class MyService extends Service { // example for getConnection async foo ( ) { const connection = await this . app . oracle .
2023-03-28 10:14:44 11KB egg egg-plugin node-oracledb egg-oracle
1
蛋mysql Egg框架的阿里云RDS客户端(支持mysql portocal) 安装 $ npm i egg-mysql --save MySQL Egg插件,支持Egg应用程序访问MySQL数据库。 该插件基于 ,如果您想了解具体用法,请参考文档。 组态 更改${app_root}/config/plugin.js以启用MySQL插件: exports . mysql = { enable : true , package : 'egg-mysql' , } ; 在${app_root}/config/config.default.js配置数据库信息: 简单数据库实例 exports . mysql = { // database configuration client : { // host host : 'mysql.com' , // port port : '3306' , // username user : 'test_user' , // password password :
2021-02-02 20:35:32 27KB mysql egg egg-mysql egg-plugin
1