2021-04-09 08:39:53 -07:00
/*
This file is used to store unsecure, application-specific data common to all
environments.
*/
2021-04-09 12:23:34 -07:00
/* eslint no-unneeded-ternary:0 */
2021-08-03 13:05:45 -07:00
// Get the version from the package.json file.
const pkgInfo = require ( '../../package.json' )
const version = pkgInfo . version
const ipfsCoordName = process . env . COORD_NAME
? process . env . COORD_NAME
: 'ipfs-bch-wallet-service'
2021-04-09 08:39:53 -07:00
module . exports = {
2021-04-09 12:23:34 -07:00
// Configure TCP port.
2021-04-09 08:39:53 -07:00
port : process . env . PORT || 5001 ,
2021-04-09 12:23:34 -07:00
// Password for HTML UI that displays logs.
2021-04-09 08:39:53 -07:00
logPass : 'test' ,
2021-04-09 12:23:34 -07:00
// Email server settings if nodemailer email notifications are used.
2021-08-03 13:05:45 -07:00
emailServer : process . env . EMAILSERVER
? process . env . EMAILSERVER
: 'mail.someserver.com' ,
emailUser : process . env . EMAILUSER
? process . env . EMAILUSER
: 'noreply@someserver.com' ,
emailPassword : process . env . EMAILPASS
? process . env . EMAILPASS
: 'emailpassword' ,
2021-04-09 12:23:34 -07:00
2021-08-08 07:38:47 -07:00
// FullStack.cash account information, used for automatic JWT handling.
2021-09-08 11:58:18 -07:00
getJwtAtStartup : process . env . GET_JWT_AT_STARTUP ? true : false ,
2021-08-08 07:38:47 -07:00
authServer : process . env . AUTHSERVER
? process . env . AUTHSERVER
: 'https://auth.fullstack.cash' ,
apiServer : process . env . APISERVER
? process . env . APISERVER
: 'https://api.fullstack.cash/v5/' ,
fullstackLogin : process . env . FULLSTACKLOGIN
? process . env . FULLSTACKLOGIN
: 'demo@demo.com' ,
fullstackPassword : process . env . FULLSTACKPASS
? process . env . FULLSTACKPASS
: 'demo' ,
2021-04-09 12:23:34 -07:00
// IPFS settings.
2021-04-15 10:11:09 -07:00
isCircuitRelay : process . env . ENABLE_CIRCUIT_RELAY ? true : false ,
2021-09-28 17:51:19 -07:00
// SSL domain used for websocket connection via browsers.
crDomain : process . env . CR_DOMAIN ? process . env . CR_DOMAIN : '' ,
2021-04-15 10:11:09 -07:00
// Information passed to other IPFS peers about this node.
apiInfo : 'https://ipfs-service-provider.fullstack.cash/' ,
// JSON-LD and Schema.org schema with info about this app.
announceJsonLd : {
'@context' : 'https://schema.org/' ,
'@type' : 'WebAPI' ,
2021-08-03 13:05:45 -07:00
name : ipfsCoordName ,
version ,
2021-08-05 17:08:56 -07:00
protocol : 'generic-service' ,
2021-08-03 13:05:45 -07:00
description :
'This is a generic IPFS Serivice Provider that uses JSON RPC over IPFS to communicate with it. This instance has not been customized. Source code: https://github.com/Permissionless-Software-Foundation/ipfs-service-provider' ,
2021-04-15 10:11:09 -07:00
documentation : 'https://ipfs-service-provider.fullstack.cash/' ,
provider : {
'@type' : 'Organization' ,
name : 'Permissionless Software Foundation' ,
url : 'https://PSFoundation.cash'
}
2021-08-19 08:01:23 -07:00
},
// IPFS Ports
ipfsTcpPort : process . env . IPFS_TCP_PORT ? process . env . IPFS_TCP_PORT : 4001 ,
2021-08-26 09:21:08 -07:00
ipfsWsPort : process . env . IPFS_WS_PORT ? process . env . IPFS_WS_PORT : 4003 ,
// BCH Mnemonic for generating encryption keys and payment address
mnemonic : process . env . MNEMONIC ? process . env . MNEMONIC : '' ,
2021-12-29 17:28:35 -08:00
debugLevel : process . env . DEBUG_LEVEL ? parseInt ( process . env . DEBUG_LEVEL ) : 2 ,
// Settings for production, using external go-ipfs node.
isProduction : process . env . SVC_ENV === 'production' ? true : false ,
ipfsHost : process . env . IPFS_HOST ? process . env . IPFS_HOST : 'localhost' ,
ipfsApiPort : process . env . IPFS_API_PORT
? parseInt ( process . env . IPFS_API_PORT )
: 5001
2021-04-09 08:39:53 -07:00
}