mirror of
https://github.com/alice-lg/birdwatcher.git
synced 2025-03-09 00:00:05 +01:00
test endpoint
This commit is contained in:
parent
97a2343dc5
commit
08c22dcd72
1 changed files with 16 additions and 1 deletions
|
@ -1,4 +1,19 @@
|
|||
package main
|
||||
|
||||
func main() {
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/julienschmidt/httprouter"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
func Test(w http.ResponseWriter, r *http.Request, ps httprouter.Params) {
|
||||
fmt.Fprint(w, "Test\n")
|
||||
}
|
||||
|
||||
func main() {
|
||||
r := httprouter.New()
|
||||
r.GET("/test", Test)
|
||||
|
||||
log.Fatal(http.ListenAndServe(":8080", r))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue