0

How does one provide global properties to the template renderer in order to not explicitly define it in every rendering endpoint?

e.g. the url the request is calling for.

Lucho
  • 1,455
  • 1
  • 13
  • 25

1 Answers1

0

Stumbled into this answer and works perfectly by injecting with a middleware and specifying what routes with the middleware consumer.

note that with express 4.x locals is an object and not a function.

Lucho
  • 1,455
  • 1
  • 13
  • 25