agolebiowska / laser-cat-game

Go & WebAssembly laser game for cats
1 stars 0 forks source link

Use more modern tools #1

Open talentlessguy opened 4 years ago

talentlessguy commented 4 years ago

I suggest using Taskfile instead of Make, the tool itself is written in Go

And tinygo instead of GOOS=js go build because it produces smaller output

agolebiowska commented 4 years ago

@talentlessguy thanks for the advice, done :)

talentlessguy commented 4 years ago

@agolebiowska btw also instead of launching docker better do this:

package main

import (
    "fmt"
    "net/http"
)

func main() {
    http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
        fmt.Fprintf(w, "Welcome to my website!")
    })

    fs := http.FileServer(http.Dir("static/"))
    http.Handle("/static/", http.StripPrefix("/static/", fs))

    http.ListenAndServe(":8080", nil)
}

and then go run server.go in Taskfile.yml