You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
357 B
20 lines
357 B
package main
|
|
|
|
import (
|
|
"net/http"
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func main() {
|
|
// Create mux handler
|
|
r := mux.NewRouter()
|
|
|
|
r.HandleFunc("/census/{family}/{genus}/{species}", GetSpecies)
|
|
r.HandleFunc("/census/{family}/{genus}", GetGenus)
|
|
r.HandleFunc("/census/{family}", GetFamily)
|
|
|
|
//r.HandleFunc("/census", Cenus)
|
|
|
|
http.ListenAndServe(":8080", r)
|
|
}
|
|
|