We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
非常赞,感谢回馈。
以下是几点建议:
exports['oauth2-server']
exports.oauth2Server
exports.oauth2Server = { debug: process.env.NODE_ENV !== 'production', grants: [ 'password' ], model: oauth_model(app), };
exports.oauth2Server = { enable: true, package: 'egg-oauth2-server', };
model 不用用户手动初始化,通过 Loader API 自动加载,可以参考 egg-sequelize 和 egg-view-nunjucks 的实现
model
app.js 里面的 console.log 可以改为 app.coreLogger,参见 日志
console.log
app.coreLogger
debug: process.env.NODE_ENV !== 'production' 可以考虑直接读取 app.config.env === 'local' 做转换
debug: process.env.NODE_ENV !== 'production'
app.config.env === 'local'
agent.js 没用可以去掉
agent.js
index.js 也是多余的,你是用了 simple 那个 boilerplate ?应该用 plugin 那个,建议用 egg-boilerplate-plugin 重新初始化下,现在看到有不少不需要的代码,如 package.json 的 scripts 等。
index.js
egg-boilerplate-plugin
The text was updated successfully, but these errors were encountered:
感谢指导,我也正在学习 egg 的写法,egg 标准化定好确实适合多人开发。
Sorry, something went wrong.
No branches or pull requests
非常赞,感谢回馈。
以下是几点建议:
exports['oauth2-server']
改为exports.oauth2Server
model
不用用户手动初始化,通过 Loader API 自动加载,可以参考 egg-sequelize 和 egg-view-nunjucks 的实现app.js 里面的
console.log
可以改为app.coreLogger
,参见 日志debug: process.env.NODE_ENV !== 'production'
可以考虑直接读取app.config.env === 'local'
做转换agent.js
没用可以去掉index.js
也是多余的,你是用了 simple 那个 boilerplate ?应该用 plugin 那个,建议用egg-boilerplate-plugin
重新初始化下,现在看到有不少不需要的代码,如 package.json 的 scripts 等。The text was updated successfully, but these errors were encountered: