Welcome to the Linux Foundation Forum!

Possible typo in Serving Static Content and Using Templates with Express (2)

Here is the quote of the paragraph I am questioning.

This is exactly as it was when generated by express-generator except we've removed the template locals object ({ title: 'Express' }) from being passed as the second argument to the res.render invocation. Express has res.render built-in to its core and it works in essentially the same way as reply.render added by the point-of-view plugin when registered in a Fastify server - although at the time of writing Express v4 renders at about half the speed of Fastify's point-of-view in production.

It mentioned reply.render() method provided by point-of-view plugin. As far as I checked, it seems that point-of-view plugin does not decorate reply object with render() method. Instead it decorates reply object with view() method.

Is this a typo or something I missed?

Thank you!

Comments

  • Posts: 160

    good catch Krave! I think it used to be render but was changed to view and overlooked in the update

  • Posts: 2,293

    This has been fixed. Thank you!

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training