I'm writing a middleware function at the moment and need a way to check the view engines that have been registered to the current app.
As it is possible in express to have two view engines:
app.engine('pug',...);
app.engine('jade',...);
app.set('view engine','pug');
app.set('view engine','jade');
//To send view
res.render('index.pug',{viewData:{}});
res.render('index.jade',{viewData:{}});
I need a way to determine the extensions of all current view engines. However, upon checking app.get('view engine') or app.settings['view engine'] it is simply set to a string (with the value of the last call the set), rather than an array as I would have expected.
How can I get the information I need?