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 ---versionTo 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/triggerdotdev/jsonhero-web.gitOr if you've forked the repository:
git clone https://github.com/<github username>/jsonhero-web.gitThen cd into the repository:
cd jsonhero-webFirst, install npm dependencies:
npm installRun the following command to create the .env file with a new SESSION_SECRET environment variable:
echo "SESSION_SECRET=$(openssl rand -hex 32)" > .envThen, run npm run build or npm run dev to build.
Start the development server:
npm startYou 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 OpenGraph Ninja to power some of the Preview URL functionality.
Coming Soon