Following that guide is easier, but as always, let’s do this as a reminder or just to keep updated all of you.
The line you must read to migrate from 2.x to 3.0 is this:
- app.dynamicHelpers() (use middleware + res.locals)
So, you have to use a middleware in order to use variables passed from server to use them on jade templates.
Just as an example you can do:
Now, in jade templates you could use that as variables. If user is authenticated you can start using its data to make ajax request or just to show it’s username (whatever you want!)