mirror of
https://github.com/nlepage/go-wasm-http-server.git
synced 2025-03-10 17:29:10 +00:00
⚗️
This commit is contained in:
parent
feec60fb35
commit
254bd5e2ea
@ -5,7 +5,7 @@
|
|||||||
<script src="https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@21aa954d1c747b6e556c42eacb5a17478245dd17/index.js"></script>
|
<script src="https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@21aa954d1c747b6e556c42eacb5a17478245dd17/index.js"></script>
|
||||||
<script>
|
<script>
|
||||||
async function hello() {
|
async function hello() {
|
||||||
res=await fetch('api/hello', {
|
res = await fetch('api/hello', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
2
sw.js
2
sw.js
@ -1,4 +1,4 @@
|
|||||||
importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.13.4/misc/wasm/wasm_exec.js')
|
importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.14.3/misc/wasm/wasm_exec.js')
|
||||||
|
|
||||||
const startWasm = async (wasm, WASMHTTP_HANDLER_ID, WASMHTTP_PATH) => {
|
const startWasm = async (wasm, WASMHTTP_HANDLER_ID, WASMHTTP_PATH) => {
|
||||||
const go = new Go()
|
const go = new Go()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user