removed old config and now /config returns env

This commit is contained in:
Peter Morton 2023-10-12 20:42:27 -05:00
parent c51ed1ba8f
commit 5dd83863cb
2 changed files with 4 additions and 20 deletions

12
.env
View File

@ -1,13 +1,7 @@
EO_API_USERNAME = apiclient
EO_API_PASSWORD = apiclient12345
EO_API_SCOPE = oidc tags context_entitlements content_entitlements em_api_access
EO_API_CLIENT_ID = default
EO_API_CLIENT_SECRET = asd
EO_API_ACCESS_TOKEN_URL = https://em5.verint.training/oidc-token-service/default/token
EO_API_UDG_URL = unified-data-gateway/default/graphql
JWT_SECRET = 12356789
PORT = 3000 PORT = 3000
## Store type 'local-storage' or 'redis' supported
STORE = local-storage STORE = local-storage
# use if STORE = redis
REDIS_URL = redis://localhost:6379 REDIS_URL = redis://localhost:6379

View File

@ -3,17 +3,7 @@ const router = Router();
router.get("/", (req, res) => { router.get("/", (req, res) => {
const config = { const config = {
"auth:": { env: process.env,
username: process.env.EO_API_USERNAME,
password: process.env.EO_API_PASSWORD ? "*******" : undefined,
scope: process.env.EO_API_SCOPE,
client_id: process.env.EO_API_CLIENT_ID,
client_secret: process.env.EO_API_SECRET ? "*******" : undefined,
},
endpoints: {
token: process.env.EO_API_ACCESS_TOKEN_URL,
udg: process.env.EO_API_UDG_URL,
},
}; };
res.send(config); res.send(config);
}); });