Skip to content

Commit

Permalink
chore: add makefile
Browse files Browse the repository at this point in the history
Signed-off-by: Norman Meier <[email protected]>
  • Loading branch information
n0izn0iz committed Jun 10, 2024
1 parent 431ca57 commit a97781c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
1 change: 1 addition & 0 deletions wasm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/weshnet.wasm
9 changes: 9 additions & 0 deletions wasm/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
GO?=go1.19

.PHONY: serve
serve: weshnet.wasm
$(GO) run ./serve

.PHONY: weshnet.wasm
weshnet.wasm:
GOOS=js GOARCH=wasm $(GO) build -o weshnet.wasm -tags nofuse .
6 changes: 5 additions & 1 deletion wasm/serve/main.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package main

import "net/http"
import (
"fmt"
"net/http"
)

func main() {
fmt.Println("serving on :4242")
http.ListenAndServe(`:4242`, http.FileServer(http.Dir(`.`)))
}

0 comments on commit a97781c

Please sign in to comment.