Fix env config in server
parent
72b02990e6
commit
507618c730
|
@ -1,5 +1,9 @@
|
|||
import dotenv from 'dotenv'
|
||||
|
||||
import type { MattermostSendMessage } from './mattermost.js'
|
||||
|
||||
dotenv.config()
|
||||
|
||||
if (!process.env.MONGO_URL) {
|
||||
throw new Error('Empty MONGO_URL env var')
|
||||
}
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
import cors from '@koa/cors'
|
||||
import Router from '@koa/router'
|
||||
import dotenv from 'dotenv'
|
||||
import Koa from 'koa'
|
||||
import koaBody from 'koa-body'
|
||||
import { koaBody } from 'koa-body'
|
||||
|
||||
import {
|
||||
PORT,
|
||||
|
@ -17,8 +16,6 @@ import { initMongodb } from './mongodb.js'
|
|||
import { getAccessToken } from './oauth.js'
|
||||
import { snakeToCamelCaseKeys, validateCrispBody } from './utils.js'
|
||||
|
||||
dotenv.config()
|
||||
|
||||
const mongo = await initMongodb()
|
||||
|
||||
type KoaState = Koa.DefaultState
|
||||
|
|
Loading…
Reference in New Issue