AgileVentures / AgileVentures/asyncvoter-api

Sensible config defaults when .env is missing

Aperta
#28 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
5
Fork
7
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

Currently if the .env file is missing, the server fails to start.

E.g. server port is defined by .env variable PORT

We should provide some sensible defaults (where possible) so that the server can run when the environment variables are missed (except when it's an absolute must).

eg. rather than `var port = process.env.PORT` we use `var port = process.env.PORT || 3000` or `var port = process.env.PORT || defaultConfig.port`

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.