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

use express-style routes #10

Open
will123195 opened this issue Dec 18, 2016 · 1 comment
Open

use express-style routes #10

will123195 opened this issue Dec 18, 2016 · 1 comment

Comments

@will123195
Copy link
Owner

will123195 commented Dec 18, 2016

export default function (req, res, next) {
  this.someVariable = 123
  this.renderHtml()
}

instead of

export default function ($) {
  $.render()
}
@will123195
Copy link
Owner Author

export default function (req, res, next) {
  return somethingAsync().then(data => {
    this.data = data
    this.render()
  })
  // .catch(next) // this should be automatic
}

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

1 participant