adzialocha / hoffnung3000

Platform for decentralized, anonymized, self-curated festivals
https://hoffnung3000.de
GNU Affero General Public License v3.0
36 stars 8 forks source link

Inject config into locales field as a middleware #105

Open adzialocha opened 4 years ago

adzialocha commented 4 years ago

Currently we load the config in place, every time we need it. It would be faster / more efficient to just load it once for every request in form of a global middleware. All the controllers can then consume the data, for example from req.locals.config.