We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e0470e commit e087ab1Copy full SHA for e087ab1
.env.example
@@ -7,5 +7,6 @@ [email protected]
7
EMAIL_SMTP_DOMAIN_MAILGUN=myproject.com
8
EMAIL_SMTP_API_MAILGUN=123456
9
FRONTEND_URL=http://localhost:8080
10
+USE_REDIS=false
11
REDIS_HOST=127.0.0.1
12
REDIS_PORT=6379
server.js
@@ -18,8 +18,8 @@ if (process.env.NODE_ENV === 'development') {
18
app.use(morgan('dev'))
19
}
20
21
-// Redis cache enabled only for production
22
-if (process.env.NODE_ENV === 'production') {
+// Redis cache enabled by env variable
+if (process.env.USE_REDIS === 'true') {
23
const getExpeditiousCache = require('express-expeditious')
24
const cache = getExpeditiousCache({
25
namespace: 'expresscache',
0 commit comments