PracowniaProgramowania/backend/web1.go

21 lines
304 B
Go
Raw Normal View History

2018-11-14 00:19:38 +01:00
package main
import (
"net/http"
)
func main() {
mux := http.NewServeMux()
files := http.FileServer(http.Dir("public"))
mux.Handle("static/", http.StripPrefix("static", files))
mux.HandleFunc("/")
server := &http.Server{
Addr: "0.0.0.0:808",
Handler: mux,
}
server.ListenAndServe()
}