2023-05-25 16:08:56 -06:00
|
|
|
package main
|
|
|
|
|
|
|
|
import "net/http"
|
|
|
|
import "hnakra/service"
|
|
|
|
|
|
|
|
func main () {
|
|
|
|
http.HandleFunc("/hello/", hellorld)
|
2023-05-29 19:22:46 -06:00
|
|
|
service.NewService (
|
|
|
|
"Hellorld", "A test service.",
|
|
|
|
service.NewHTTP("@", "/hello/", nil)).Run()
|
2023-05-25 16:08:56 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
func hellorld (res http.ResponseWriter, req *http.Request) {
|
|
|
|
res.Header().Add("content-type", "text/plain")
|
|
|
|
res.WriteHeader(200)
|
|
|
|
res.Write([]byte("Hellorld!\n"))
|
|
|
|
}
|