czxcxzc
This commit is contained in:
parent
8ee4373144
commit
037428990e
2
main.go
2
main.go
@ -1,6 +1,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
@ -13,6 +14,7 @@ func main() {
|
||||
r := chi.NewRouter()
|
||||
r.Get("/", HandleIndex)
|
||||
r.Get("/{name}", HandleDynamic)
|
||||
fmt.Println("Server started on port 8008")
|
||||
if err := http.ListenAndServe(":8008", r); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user