Remix.run Logo
reactordev 4 days ago

I was happily reading along loving all the go until the last part.

   npx http-server
No. Just use go.

Other than that. Loved the article and I love making games (haven’t shipped one in a while, I should)

reactordev 3 days ago | parent [-]

https://gist.github.com/paulmach/7271283

It’s literally a one-liner of go to create an http server, http.FileServer that points to a directory.

    go run http.go

You shouldn’t have to use npx when the tool at hand is perfectly capable.
uncircle 3 days ago | parent [-]

Why write 27 lines of Go (not one line) when you can do

  python -m http.server
And still it is a silly argument because using npx is still less effort than having to write those 27 lines when zero will do. Sure, you dislike Javascript, do whatever you want. No need for pointless pedantry.
reactordev 3 days ago | parent [-]

10 lines of that are comments, 4 of which are flags that aren’t required, nor is the 2 lines of white space and log lines.

The guy goes through all this trouble with Golang, WASM, tinygo, just to field goal it on the 3 yard line.