I am trying to follow the directions from here using mock routing but I am having some difficulty getting started. I definitely have beaker working with mock routing but I am not getting window.safeApp
injected when using localhost. Here are the steps
- make a folder, cd into that folder
- put index.html (below) in
- run
python3 -m http.server 8000 --bind 127.0.0.1
or equivalent - visit
localhost://p:8000/
in mock routing beaker browser - see the wtf alert
Any help would be appreciated, just trying to get started with hello world here
<html>
<head>
<title>dumb</title>
</head>
<body>
stupid simple safe network
<script>
if (typeof(window.safeApp) == "undefined")
alert('wtf?')
// alert('hi')
window.safeApp.initialise({
id: 'myid',
name: 'myname',
vendor: 'me'
}, (newState) => {
console.log("Network state changed to: ", newState);
})
.then((appHandle) => {
console.log('SAFEApp instance initialised and handle returned: ', appHandle);
});
</script>
</body>
</html>
js code is from docs