20 lines
400 B
Go
20 lines
400 B
Go
package main
|
|
|
|
import "fmt"
|
|
import "log"
|
|
import "html"
|
|
import "net/http"
|
|
import "github.com/starfederation/datastar-go/datastar"
|
|
|
|
func homeHandler(w http.ResponseWriter, r *http.Request) {
|
|
fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))
|
|
}
|
|
|
|
func main() {
|
|
fmt.Println("Hello Recipe Server!")
|
|
|
|
//Handlers
|
|
http.HandleFunc("/", homeHandler)
|
|
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|