@fxhash/config
v0.0.14
Published
This contains all variables used within all modules of fx(package)
Readme
@fxhash/config
This contains all variables used within all modules of fx(package)
Installation
pnpm add @fxhash/configUsage
For you application you usually want to use the config like this:
import { config } from "@fxhash/config"This singleton will expose variables for testnet/mainnet based on the FXHASH_ENV .env variable.
- Set
FXHASH_ENV=devto expose the config for testnet/dev environments - Set
FXHASH_ENV=prdorFXHASH_ENV=productionto expose the config for mainnet/production environments
Note: If the
@fxhash/configpackage is used on the client side you also have to set theNEXT_PUBLIC_FXHASH_ENVorREACT_APP_FXHASH_ENVenvironment variable.
Local development
Additional to the testnet and mainnet specific configuration there is the 3rd option for local development. This option is designed to be used within the fxhash monorepository. You can use it by setting the FXHASH_ENV=local environment variable. Since all services are dockerised there is an additional localDocker configuration. This configuration is automatically used when the @fxhash/config package is used inside a docker container and the FXHASH_ENV is set to local. The localDocker configuration basically just replaces all "localhost" urls with "host.docker.internal".
- Set
FXHASH_ENV=localto expose the config for local development within the fxhash monorepository
