Thanks that worked.
S
Posts made by Snowbunny
-
How can I persist data and reload it between each render ?
I need to store a token in memory that can be reused by each render. I tried something like this with a custom module but it's being reset on every render.
const state = require('src/state.js'); async function beforeRender(req, res) { // should be not null on the second render if(!state.getToken()){ const token = await login(); state.setToken(token) } // use token... }
-
RE: Import templates from module?
Initially I wanted to load the templates as a npm module in jsreport. I didn't think the data folder can be versioned with git. I'll probably do that instead. Thanks for the help.
-
Import templates from module?
Hello. Is it possible to configure jsreport to load templates from a separate package ? I would like to store my templates in git and import them without having to copy paste the code manually.