kk-koa-framework
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -148,4 +148,10 @@ const Koa = require('koa') | ||
this.compileWebpack() | ||
var listener = this.app.listen(this.argv.port || this.app.$$.config.port || 6880, () => { | ||
let args = [this.argv.port || this.app.$$.config.port || 6880] | ||
let hostname = this.argv.hostname || this.app.$$.config.hostname | ||
if(hostname){ | ||
args.push(hostname) | ||
} | ||
var listener = this.app.listen(...args, () => { | ||
const pretyFont = CFonts.render('KK-KOA-FRAMEWORK',{ | ||
@@ -152,0 +158,0 @@ font: 'chrome', |
@@ -6,3 +6,3 @@ { | ||
"name": "kk-koa-framework", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "kk koa mvc webframework", | ||
@@ -9,0 +9,0 @@ "main": "index.js", |
# kk-koa-framework | ||
## 3.1.1 版本改动 | ||
app启动可绑定ip,可以在config配置中添加hostname字段 | ||
`module.exports = {hostname:"x.x.x.x"}` | ||
或 | ||
`node app.js --hostname x.x.x.x` | ||
## 3.1.0 版本改动 | ||
添加createMethod,createMeta方法,可以增加编辑器代码提示功能 | ||
enableWebpack 方法需传入webpack包 ,可选传入webpack-dev-middleware以美化输出 | ||
`app.enableWebpack(require('path to webpack.config.js'),require('webpack'),require('webpack-dev-middleware'))` | ||
## 2.1.7 版本改动 | ||
@@ -4,0 +23,0 @@ |
@@ -5,3 +5,3 @@ const Koa = require('../index') | ||
const {RegisterStrategy, WeixinStrategy} = passport | ||
// const {RegisterStrategy, WeixinStrategy} = passport | ||
@@ -13,17 +13,17 @@ const app = new Koa() | ||
passport.use(new RegisterStrategy(()=>{},({username,password},done)=>{ | ||
console.log('enter register') | ||
done(null) | ||
})) | ||
// passport.use(new RegisterStrategy(()=>{},({username,password},done)=>{ | ||
// console.log('enter register') | ||
// done(null) | ||
// })) | ||
passport.use(new WeixinStrategy({ | ||
clientID: 'wxb466441ce83229ba' | ||
, clientSecret: '64fa70131050c949cc114687cd448171' | ||
, callbackURL: 'http://m.leasio.com/weixinLogin' | ||
}, (params) => { | ||
console.log('param:', params) | ||
return params | ||
})) | ||
// passport.use(new WeixinStrategy({ | ||
// clientID: 'wxb466441ce83229ba' | ||
// , clientSecret: '64fa70131050c949cc114687cd448171' | ||
// , callbackURL: 'http://m.leasio.com/weixinLogin' | ||
// }, (params) => { | ||
// console.log('param:', params) | ||
// return params | ||
// })) | ||
app.use() | ||
// app.use() | ||
@@ -30,0 +30,0 @@ app.setup() |
122999
1414
396