Files
SCM-Manager/scm-ui/ui-components/src/__resources__/HttpServer.go.js
2019-10-17 14:13:54 +02:00

19 lines
344 B
JavaScript

export default `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(":80", nil)
}
`;