Local Environment Setup
Last updated
Was this helpful?
Last updated
Was this helpful?
This tutorial will help get your local environment setup and show you how to secure your setup for the local wallet pairings. You will also configure environment variables to use the Pinata IPFS API. By the end of this guide, you’ll have your local environment set up and configured to run the HashioDAO application locally.
The installed.
A account created.
and installed.
Open a new terminal and navigate to your preferred directory where you want your project to live. Clone the repo and install dependencies using these commands:
These commands clone the project repository onto your local machine and install all the necessary dependencies using the yarn package manager.
The HashioDAO app utilizes the library to pair with supported wallet extensions. Currently, the only supported wallet extension is . The HashConnect 1-click pairing feature only works in an SSL secured environment (https URLs). Enable HTTPS
in your local build by creating a .env
file in the root of this project and adding the HTTPS
environment variable to it.
Add the HTTPS
environment variable to your .env
file and set it to true
:
Install mkcert
via Homebrew (on macOS):
Generate the certificate and key, storing them in a .cert
directory:
Set the SSL_CRT_FILE
and SSL_CRT_FILE
environment variables to the path of the certificate and key files. Add the variables to your .env
file:
The HashioDAO app stores and retrieves IPFS data using Pinata. A Pinata public key, secret key, and gateway URL are necessary for IPFS pinning and fetching features to work as intended. If you have not already done so, create a Pinata account to generate a new set of keys and a gateway URL.
Add the below environment variables to your .env
file to use the Pinata IPFS API:
Run the application using the below command:
This command will start your application, and you should see an https://
prefixed URL for your local server, indicating that HTTPS is successfully enabled.
Create an SSL certificate. There are several tools that can be used to generate a certificate and key. An easy way to do this is to use the tool.
A more comprehensive tutorial can be found in the .
➡
➡
➡