Commit 0ae5d4ab authored by Eric Betts's avatar Eric Betts

log only what dotenv loaded

parent 15e942b9
'use strict'
require('dotenv').config()
const dotenv = require('dotenv')
if (false) {
require('.env') // So the file is included by netlify zip it and ship it
}
const result = dotenv.config()
if (result.error) {
throw result.error
}
console.log(result.parsed)
const awsServerlessExpress = require('aws-serverless-express')
const express = require('express')
......@@ -12,7 +17,6 @@ const MemoryAdapter = require('oidc-provider/lib/adapters/memory_adapter');
const { URL, DEPLOY_URL, DEPLOY_PRIME_URL } = process.env;
const configuration = {
adapter: SuperMemoryAdapter,
clients: [{
......@@ -30,7 +34,6 @@ const app = express()
// Correct host when lambda is executed by netlify
app.use((req, res, next) => {
const url = new global.URL(DEPLOY_PRIME_URL || DEPLOY_URL || URL);
console.log(process.env);
console.log({DEPLOY_PRIME_URL, DEPLOY_URL, URL});
req.headers.host = url.host;
next();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment