HTTP API Gateway

Install the HTTP API Gateway

1. Clone the Repository

circle-info

Use the same working directory for all the workers.

Inside your working directory, run the following command to clone the (miningos-app-nodearrow-up-right) repository:

git clone https://github.com/tetherto/miningos-app-node.git

After cloning the repository, move into its directory:

cd miningos-app-node

2. Install Dependencies

Inside the miningos-app-node directory, run the following command to install dependencies using npm:

npm ci

3. Generate Configuration Files

Next, run the following script to scan the config/ directory, copy each .example file into an active configuration file by removing the .example suffix.

sh setup-config.sh

4. Edit the Configuration Files

config/common.json

Open the config/common.json file and update the following properties:

You should use the rpcPublicKey you generated when you started the service orchestrator.

You should set the staticRootPath to the absolute path to the miningos-app-ui/build directory you created when you installed the React Web App UI.

config/facs/auth.config.json

Open the config/facs/auth.config.json file and update the following properties:

config/facs/httpd-oauth2.config.json

Open the config/facs/httpd-oauth2.config.json file and update the following properties:

4. Enable Debugging and Start the Worker

You can now start the worker by running the following command:

circle-info

Commands, OAuth settings, and configuration use port 3000, but the process can run on any local port. Make sure to use the same port number everywhere.

Last updated