examples/helloworldThe helloworld.example microservice demonstrates the classic minimalist example.
http://localhost:8080/helloworld.example/hello-world simply prints Hello, World!.
The code looks rather daunting but all of it is generated by two prompts.
HEY CLAUDE…
Create a new microservice helloworld in @examples/helloworld/ with the hostname “helloworld”.
HEY CLAUDE…
Create a web endpoint that prints “Hello, World!”
The implementation is in service.go.
func (svc *Service) HelloWorld(w http.ResponseWriter, r *http.Request) (err error) { // MARKER: HelloWorld
w.Write([]byte("Hello, World!"))
return nil
}