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

support templates #30

Closed
mcollina opened this issue Dec 15, 2016 · 3 comments
Closed

support templates #30

mcollina opened this issue Dec 15, 2016 · 3 comments
Labels
semver-minor Issue or PR that should land as semver minor

Comments

@mcollina
Copy link
Member

Something like http://npm.im/vision, that provides plugin-specific views.

@delvedor
Copy link
Member

Good idea!
Maybe we can use the same syntax of Hapi and expose reply.view :)

@jsumners
Copy link
Member

I'm an avid user of Hapi. I do not care for Hapi's template implementation. It's too rigid and does not promote streaming; even when set to async. I usually skip Hapi's template support completely and directly use Marko:

// using Marko's `require` extension
const myTemplate = require('./path/to/template.marko')

const getRoute = {
  path: '/',
  method: 'GET',
  handler (req, reply) {
    return reply(myTemplate.stream())
  }
}

@delvedor delvedor mentioned this issue Jan 11, 2017
@delvedor
Copy link
Member

delvedor commented Apr 3, 2017

@delvedor delvedor closed this as completed Apr 3, 2017
haggholm pushed a commit to haggholm/fastify that referenced this issue Jun 12, 2021
@Eomm Eomm added the semver-minor Issue or PR that should land as semver minor label Apr 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-minor Issue or PR that should land as semver minor
Projects
None yet
Development

No branches or pull requests

4 participants