Welcome to JSON Hero development and thanks for being here! If you'd like to run JSON Hero locally, please use the following guide to get started. If you have any issues with this guide please feel free to email me at eric@jsonhero.io or come leave a message in our open Discord Channel.
For more information about contributing to JSON Hero please see the Contributing doc.
Before you can run JSON Hero locally, you will need to install the following dependencies on your machine:
You most likely already have git installed on your machine, but if not, you can install it from the Git website.
Even though JSON Hero runs on Cloudflare Workers, which isn't a Node.js environment, you will still need Node.js 16 to run it locally. The recommended way to install Node.js is to download a pre-built package from the Node.js website
If you install Node.js through the above link, you should also have NPM automatically installed as well. To make sure, run the following command in your preferred Terminal:
npm ---version
To contribute code to JSON Hero, you should first create a fork of the jsonhero-web repository on GitHub. Follow these instructions on repository forking.
In your terminal, issue the following command to clone the repository to your local machine:
git clone https://github.com/apihero-run/jsonhero-web.git
Or if you've forked the repository:
git clone https://github.com/<github username>/jsonhero-web.git
Then cd
into the repository:
cd jsonhero-web
First, install npm dependencies:
npm install
Run the following command to create the .env
file with a new SESSION_SECRET
environment variable:
echo "SESSION_SECRET=$(openssl rand -hex 32)" > .env
Then, run npm run build
or npm run dev
to build.
Start the development server:
npm start
You should now be able to access your local JSON Hero server on localhost:8787
Note JSON documents created locally are not persisted across server restarts
We currently use Peekalink to power some of the Preview URL functionality. This feature is disabled unless there is a valid PEEKALINK_API_KEY
environment variable set in your .env
file created above.
If you'd like to enable this functionality locally, signup for Peekalink and set the PEEKALINK_API_KEY
Coming Soon