removed dotenv.config calls

This commit is contained in:
Ulf Gebhardt 2019-06-03 18:47:00 +02:00
parent 4fd2885b26
commit caa6a65f99
No known key found for this signature in database
GPG Key ID: 44C888923CC8E7F3
6 changed files with 4 additions and 16 deletions

View File

@ -23,7 +23,6 @@ export default class ActivityPub {
static init(server) {
if (!activityPub) {
dotenv.config()
activityPub = new ActivityPub(CONFIG.CLIENT_URI, CONFIG.GRAPHQL_URI)
// integrate into running graphql express server

View File

@ -1,11 +1,12 @@
import dotenv from 'dotenv'
import { resolve } from 'path'
// import dotenv from 'dotenv'
// import { resolve } from 'path'
import crypto from 'crypto'
import request from 'request'
import CONFIG from './../../config'
const debug = require('debug')('ea:security')
dotenv.config({ path: resolve('src', 'activitypub', '.env') })
// TODO Does this reference a local config? Why?
// dotenv.config({ path: resolve('src', 'activitypub', '.env') })
export function generateRsaKeyPair(options = {}) {
const { passphrase = CONFIG.PRIVATE_KEY_PASSPHRASE } = options

View File

@ -1,9 +1,6 @@
import { v1 as neo4j } from 'neo4j-driver'
import dotenv from 'dotenv'
import CONFIG from './../config'
dotenv.config()
let driver
export function getDriver(options = {}) {

View File

@ -1,10 +1,8 @@
import { generateRsaKeyPair } from '../activitypub/security'
import { activityPub } from '../activitypub/ActivityPub'
import as from 'activitystrea.ms'
import dotenv from 'dotenv'
const debug = require('debug')('backend:schema')
dotenv.config()
export default {
Mutation: {

View File

@ -1,9 +1,5 @@
import dotenv from 'dotenv'
import createOrUpdateLocations from './nodes/locations'
dotenv.config()
export default {
Mutation: {
CreateUser: async (resolve, root, args, context, info) => {

View File

@ -1,9 +1,6 @@
import { cleanDatabase } from './factories'
import dotenv from 'dotenv'
import CONFIG from './config'
dotenv.config()
if (!CONFIG.DEBUG) {
throw new Error(`YOU CAN'T CLEAN THE DATABASE WITH DEBUG=${CONFIG.DEBUG}`)
}