https://github.com/ripta/recurse-world
Hello world app in golang that calls to itself?
https://github.com/ripta/recurse-world
containers golang hello-world
Last synced: 6 days ago
JSON representation
Hello world app in golang that calls to itself?
- Host: GitHub
- URL: https://github.com/ripta/recurse-world
- Owner: ripta
- Created: 2018-07-19T08:48:32.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-26T17:35:34.000Z (over 1 year ago)
- Last Synced: 2025-02-16T09:43:05.321Z (4 months ago)
- Topics: containers, golang, hello-world
- Language: Go
- Size: 24.4 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Hello world app in golang that calls to other hello world apps
```
go build .
```Open 3 terminals, so you can run 3 copies of the server on different ports, where #0 calls #1, #1 calls #2, and #2 calls #0.
```
./recurse-world -port 8080 -upstream localhost:8081 -server-name zero
./recurse-world -port 8081 -upstream localhost:8082 -server-name one
./recurse-world -port 8082 -upstream localhost:8080 -server-name two
```When you do a curl, you'll see:
```
% curl 'localhost:8080/hello/world/hello/world/meow/echo?foo=bar'
2018-07-19T01:28:07.851351-07:00 zero /hello/world/hello/world/meow/echo
2018-07-19T01:28:07.854602-07:00 one /world/hello/world/meow/echo
2018-07-19T01:28:07.856630-07:00 two /hello/world/meow/echo
2018-07-19T01:28:07.858659-07:00 zero /world/meow/echo
2018-07-19T01:28:07.859904-07:00 one /meow/echo
echo says: foo=bar
```