Initial commit
This commit is contained in:
commit
9a3ff5f7bd
3 changed files with 71 additions and 0 deletions
20
main.go
Normal file
20
main.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue