Browser - amark/gun GitHub Wiki

Script

The easiest way is to just add GUN into your HTML:

<script src="https://cdn.jsdelivr.net/npm/gun/gun.js"></script>
<script>
gun = GUN(); // your code here
</script>

Require

If you are using Webpack or other build tools, first follow the npm install, then add this to your browser code:

const GUN = require('gun/gun');

Import

Same as with require, but using the latest ES6 syntax:

import GUN from "https://cdn.skypack.dev/gun";
⚠️ **GitHub.com Fallback** ⚠️