parent
8d3b2658f0
commit
32394f4f8b
@ -1,13 +1,25 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/kyokomi/emoji"
|
||||
)
|
||||
|
||||
const listeningPort = "80"
|
||||
|
||||
func main() {
|
||||
fmt.Println("#####################################")
|
||||
fmt.Println("########## StackEdit Server #########")
|
||||
fmt.Println("########## by Quentin McGaw #########")
|
||||
fmt.Println("########## Give some " + emoji.Sprint(":heart:") + "at ##########")
|
||||
fmt.Println("# github.com/qdm12/stackedit-docker #")
|
||||
fmt.Print("#####################################\n\n")
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
http.ServeFile(w, r, r.URL.Path[1:])
|
||||
})
|
||||
log.Fatal(http.ListenAndServe(":80", nil))
|
||||
log.Println("Web UI listening on 0.0.0.0:" + listeningPort + emoji.Sprint(" :ear:"))
|
||||
log.Fatal(http.ListenAndServe("0.0.0.0:"+listeningPort, nil))
|
||||
}
|
||||
|
Loading…
Reference in new issue