Add the following line as early as possible to the <head> tag of your index.html:
index.html
1
<script
2
async
3
type="text/javascript"
4
data-cfasync="false"
5
src="https://static.edgeme.sh/client.js"
6
onload="window.edgemesh = new Edgemesh()">
7
</script>
Copied!
You can pass any of the Client Config options to the Edgemesh class constructor:
index.html
1
<script
2
async
3
type="text/javascript"
4
data-cfasync="false"
5
src="https://static.edgeme.sh/client.js"
6
onload="window.edgemesh =newEdgemesh({
7
swUrl:'/my-sw.js',
8
scope:'/assets'
9
})">
10
<script/>
Copied!
That's it! If there is an installation issue it will be printed in your browsers javascript console. A common one is forgetting to verify your origin on the Edgemesh Portal.