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

app.js/agent.js 支持返回一个 promise #51

Closed
popomore opened this issue Aug 18, 2016 · 0 comments · Fixed by eggjs/core#18
Closed

app.js/agent.js 支持返回一个 promise #51

popomore opened this issue Aug 18, 2016 · 0 comments · Fixed by eggjs/core#18

Comments

@popomore
Copy link
Member

// app.js
module.exports = app => new Promise(resolve => {
   doAsync(resolve);
});

or

module.exports = async function() {
  await doAsync();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant