Files
SCM-Manager/scm-ui/ui-components/src/__resources__/HttpServer.go.js

19 lines
344 B
JavaScript
Raw Normal View History

export default `package main
2019-10-17 12:07:20 +02:00
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)
}
`;