* Sets up the express rendering engine and views directory. * * @param app {Function} Express.js app * @param configPath {string}
(app, configPath)
| 224 | * @param configPath {string} |
| 225 | */ |
| 226 | function initViews (app, configPath) { |
| 227 | const viewsPath = config.initDefaultViews(configPath) |
| 228 | |
| 229 | app.set('views', viewsPath) |
| 230 | app.engine('.hbs', handlebars({ |
| 231 | extname: '.hbs', |
| 232 | partialsDir: viewsPath, |
| 233 | defaultLayout: null |
| 234 | })) |
| 235 | app.set('view engine', '.hbs') |
| 236 | } |
| 237 | |
| 238 | /** |
| 239 | * Sets up WebID-related functionality (account creation and authentication) |