Skip to content
New issue

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

extend/application.js空导出,导致接口返回404 #5316

Open
qinfeng0214 opened this issue May 27, 2024 · 1 comment
Open

extend/application.js空导出,导致接口返回404 #5316

qinfeng0214 opened this issue May 27, 2024 · 1 comment

Comments

@qinfeng0214
Copy link

在此输入你需要反馈的 Bug 具体信息(Bug in Detail):

您好,我正在学习egg。如果我的application.js代码,不注释这些代码,接口访问就会返回404
// app/extend/application.js
// 扩展 application 对象,可以添加应用级别的中间件、配置日志等。
//不注释下面的代码,就会导致我的接口返回404
module.exports = {
properties: {
// 应用级别的属性
},
// 应用生命周期方法
async beforeStart() {
// 应用启动前执行的逻辑
},
async didLoad() {
// 应用加载完成后执行的逻辑
}
// 其他生命周期方法...
}

可复现问题的仓库地址(Reproduction Repo)

null

Node 版本号:

v18.16.0

Eggjs 版本号:

egg3

相关插件名称与版本号(PlugIn and Name):

null

操作平台与版本号(Platform and Version):

mac

@sinkhaha
Copy link
Contributor

sinkhaha commented Jun 4, 2024

有例子吗,单独看你的描述没理由会导致404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants