Last active
June 10, 2019 21:01
-
-
Save marianocodes/eb6b8bde3724efaa0df0b79af7461fb1 to your computer and use it in GitHub Desktop.
Convector with NestJS - env
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as dotenv from 'dotenv'; | |
dotenv.config(); | |
// tslint:disable-next-line:no-var-requires | |
const homedir = require('os').homedir(); | |
export const chaincode = process.env.CHAINCODE || 'person'; | |
export const channel = process.env.CHANNEL || 'ch1'; | |
// Automatically extract credentials by the user id | |
// If no .env config is found, fallback to Hurley defaults | |
export const identityId = process.env.IDENTITYID || 'gov'; | |
export const identityName = process.env.IDENTITY || 'admin'; | |
export const identityOrg = process.env.ORG || 'org1'; | |
export const keyStore = | |
process.env.KEYSTORE || `/${homedir}/hyperledger-fabric-network/.hfc-${identityOrg}`; | |
export const networkProfile = | |
process.env.NETWORKPROFILE || `/${homedir}/hyperledger-fabric-network/network-profiles/${identityOrg}.network-profile.yaml`; | |
export const port = process.env.PORT || 8000; | |
// Default to common values | |
export const couchDBView = process.env.COUCHDBVIEW || 'ch1_person'; | |
export const couchDBProtocol = process.env.COUCHDB_PROTOCOL || 'http'; | |
export const couchDBHost = process.env.COUCHDB_HOST || 'localhost'; | |
export const couchDBPort = process.env.COUCHDB_PORT || 5084; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment