diff --git a/.env.example b/.env.example index 5f663ce..615c806 100644 --- a/.env.example +++ b/.env.example @@ -21,3 +21,5 @@ BASE_URL=http://srv.espacecondorcet.org:8001 WEB_UI_URL=http://localhost:8080 MOCK_EMAIL=false + +DISABLE_TWIG_CACHE=false diff --git a/src/app.ts b/src/app.ts index bc0c879..379f10e 100644 --- a/src/app.ts +++ b/src/app.ts @@ -33,7 +33,9 @@ const app: express.Application = express() const host: string = process.env.HOST === undefined ? '127.0.0.1' : process.env.HOST const port: number = 8001 -twig.cache(false) +if (process.env.DISABLE_TWIG_CACHE === 'true') { + twig.cache(false) +} let main = async () => { EmailService.init()