initial commit
This commit is contained in:
19
main.go
Normal file
19
main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"Hyst2API/app"
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
"github.com/go-chi/chi/v5"
|
||||
)
|
||||
|
||||
func main() {
|
||||
r := chi.NewRouter()
|
||||
r.Post("/nodes", app.AddNode)
|
||||
r.Get("/nodes", app.GetNodes)
|
||||
r.Get("/nodes/{id}", app.GetNodeById)
|
||||
r.Post("/users", app.AddUser)
|
||||
r.Get("/sub/{id}", app.Sub)
|
||||
log.Fatal(http.ListenAndServe(":9997", r))
|
||||
}
|
||||
Reference in New Issue
Block a user