fix local debug

This commit is contained in:
medcl 2020-03-22 14:19:36 +08:00
parent 1e03bc9ada
commit fb842ee750
1 changed files with 2 additions and 1 deletions

View File

@ -5,7 +5,8 @@ const Controller = require('egg').Controller;
class HomeController extends Controller {
async index() {
if(this.app.config.env == "local") {
this.app.config.assets.url = `http://${this.ctx.helper.getIPAddress()}:10000`;
//TODO remove hardcode
this.app.config.assets.url = `http://localhost:10000`;
}
await this.ctx.render('index.html');
}