added main example

This commit is contained in:
Carl Fredrik Samson
2020-01-30 23:57:02 +01:00
parent 59f00d69e9
commit a84faa9f3f
15 changed files with 394 additions and 259 deletions

View File

@@ -350,6 +350,21 @@ one. <a href="https://github.com/async-rs/async-std">async std</a> and <a href="
</div>
<!-- Livereload script (if served using the cli tool) -->
<script type="text/javascript">
var socket = new WebSocket("ws://localhost:3001");
socket.onmessage = function (event) {
if (event.data === "reload") {
socket.close();
location.reload(true); // force reload from server (not from cache)
}
};
window.onbeforeunload = function() {
socket.close();
}
</script>