egg-ngrok
v1.0.3
Published
The ngrok plugin for eggjs.
Downloads
11
Maintainers
Readme
egg-ngrok
描述
- eggjs + ngrok 插件
##安装
npm install egg-ngrok --save
开启插件
// config/plugin.js
exports.ngrok = {
enable: true,
package: 'egg-ngrok',
};
##导入 config.default.js 配置
module.exports = appInfo => ({
ngrok: {
/**
* 开启app agent两种模式
*/
enable: ['app', 'agent'],
/**
* http|tcp|tls, defaults to http
*/
proto: 'http',
/**
* 端口或adress地址
* port or network address, defaultst to 80
*/
addr: 7001,
/**
* http basic authentication for tunnel
*/
// auth: 'user:pwd',
/**
* reserved tunnel name https://alex.ngrok.io
*/
subdomain: '',
/**
* your authtoken from ngrok.com
*/
authtoken: '',
/**
* one of ngrok regions (us, eu, au, ap), defaults to us
*/
region: 'us'
}
})
ngrok 详细配置
请到 ngrok.com 查看详细配置项说明。