add dotenv to server

This commit is contained in:
wancat committed 2024-01-29 13:21:33 +08:00
1 parent 7216158053
commit ba3b40792b
3 files changed
+10 -4

No files matched your search

+4
View File
@@ -1,6 +1,10 @@
import validator from 'validator'
import { get } from './utils/env.js'
// Import dotenv and load ../.env
import dotenv from 'dotenv'
dotenv.config({ path: '../.env' })
function getTrustProxies(key) {
if (!process.env[key]) {
return []