Skip to content

Instantly share code, notes, and snippets.

@naikrovek
Created April 27, 2021 10:56
Show Gist options
  • Save naikrovek/1ba61a60b66f0bb40dbe105b09cd052e to your computer and use it in GitHub Desktop.
Save naikrovek/1ba61a60b66f0bb40dbe105b09cd052e to your computer and use it in GitHub Desktop.

Revisions

  1. naikrovek created this gist Apr 27, 2021.
    15 changes: 15 additions & 0 deletions main.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    package main

    import (
    "embed"
    "log"
    "net/http"
    )

    //go:embed cmd/* prebuilt/* index.html jquery-linedtextarea.js playground.js sharing.js style.css wasm_exec.js
    var content embed.FS

    func main() {
    http.Handle("/", http.FileServer(http.FS(content)))
    log.Fatal(http.ListenAndServe(":8080", nil))
    }