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

使用问题: 请问如何在egg应用下运行脚本,以及如何在脚本中使用app中的service,helper,db等能力 #5283

Open
cmingxu opened this issue Jan 9, 2024 · 1 comment

Comments

@cmingxu
Copy link

cmingxu commented Jan 9, 2024

使用问题: 请问如何在egg应用下运行脚本,以及如何在脚本中使用app中的service,helper,db等能力

@atian25
Copy link
Member

atian25 commented Jan 9, 2024

不支持这种用法。

要想实现的话,可以试下用 Node 的 repl api,里面去 new 一个 egg,用 egg.start() 这样的单进程,然后就有 app 这个对象可以 expose 给 repl 用了。

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