Update dotenv syntax

This commit is contained in:
Yarmo Mackenbach 2022-11-17 22:54:13 +01:00
parent 4e323246eb
commit 11f9cd940f
No known key found for this signature in database
GPG key ID: 37367F4AF4087AD1
4 changed files with 8 additions and 4 deletions

View file

@ -31,7 +31,8 @@ import express from 'express'
import { check, validationResult } from 'express-validator' import { check, validationResult } from 'express-validator'
import Ajv from 'ajv' import Ajv from 'ajv'
import { generateWKDProfile, generateHKPProfile } from '../../server/index.js' import { generateWKDProfile, generateHKPProfile } from '../../server/index.js'
import 'dotenv/config.js' import * as dotenv from 'dotenv'
dotenv.config()
const router = express.Router() const router = express.Router()
const ajv = new Ajv({ coerceTypes: true }) const ajv = new Ajv({ coerceTypes: true })

View file

@ -31,7 +31,8 @@ import express from 'express'
import { check, validationResult } from 'express-validator' import { check, validationResult } from 'express-validator'
import Ajv from 'ajv' import Ajv from 'ajv'
import { generateWKDProfile, generateHKPProfile } from '../../server/index.js' import { generateWKDProfile, generateHKPProfile } from '../../server/index.js'
import 'dotenv/config.js' import * as dotenv from 'dotenv'
dotenv.config()
const router = express.Router() const router = express.Router()
const ajv = new Ajv({ coerceTypes: true }) const ajv = new Ajv({ coerceTypes: true })

View file

@ -30,7 +30,8 @@ more information on this, and how to apply and follow the GNU AGPL, see <https:/
import express from 'express' import express from 'express'
import { query, validationResult } from 'express-validator' import { query, validationResult } from 'express-validator'
import { fetcher, enums as E } from 'doipjs' import { fetcher, enums as E } from 'doipjs'
import 'dotenv/config.js' import * as dotenv from 'dotenv'
dotenv.config()
const router = express.Router() const router = express.Router()

View file

@ -31,7 +31,8 @@ import express from 'express'
import { readFileSync } from 'fs' import { readFileSync } from 'fs'
import { stringReplace } from 'string-replace-middleware' import { stringReplace } from 'string-replace-middleware'
import * as pug from 'pug' import * as pug from 'pug'
import 'dotenv/config.js' import * as dotenv from 'dotenv'
dotenv.config()
import apiRoute from './routes/api.js' import apiRoute from './routes/api.js'
import mainRoute from './routes/main.js' import mainRoute from './routes/main.js'