Revert "⚗️ Try w/o using jsdelivr"

This reverts commit 2a84a402ce54760604057daa53ca991d43fda347.
This commit is contained in:
Nicolas Lepage 2021-01-21 22:00:21 +01:00
parent a6785f45f9
commit a9981520e5
No known key found for this signature in database
GPG Key ID: B0879E35E66D8F6F
2 changed files with 5 additions and 6 deletions

View File

@ -2,16 +2,15 @@
<html>
<head>
<title>go-wasm-http-server demo</title>
<script src="https://raw.githubusercontent.com/nlepage/go-wasm-http-server/master/index.js"></script>
<script src="https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@254bd5e2ea5b84b4ed2918f8edc7981fb24b06ad/index.js"></script>
<script>
async function hello() {
const name = document.querySelector("#name").value
const res = await fetch('api/hello', {
res = await fetch('api/hello', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({ name })
body: JSON.stringify({ name: document.querySelector("#name").value })
})
const { message } = await res.json()
alert(message)

View File

@ -1 +1 @@
importScripts('https://raw.githubusercontent.com/nlepage/go-wasm-http-server/master/sw.js')
importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@254bd5e2ea5b84b4ed2918f8edc7981fb24b06ad/sw.js')