Fix tests

This commit is contained in:
Armin 2019-03-25 13:34:02 +01:00
parent 1d5a8d3917
commit 5e4ff7cf9b

View File

@ -34,7 +34,7 @@ export default class ActivityPub {
dotenv.config()
const url = new URL(process.env.GRAPHQL_URI)
// TODO Check why the hostname attribute in the prod env not containing the tld! Following line is a quick fix!!
const hostname = url.hostname.endsWith('.org') ? url.hostname : url.hostname.concat('.org')
const hostname = url.hostname.endsWith('.org') || url.hostname.indexOf('localhost') > -1 ? url.hostname : url.hostname.concat('.org')
activityPub = new ActivityPub(hostname || 'localhost', url.port || 4000, url.origin)
// integrate into running graphql express server