mirror of
https://github.com/alexgo-io/stacks-puppet-node.git
synced 2026-01-12 22:43:42 +08:00
A Relay Server
The relay server is an HTTP service that has two functions:
- Accepting messages and storing all of them.
POSTmethod. For example,curl 'http://127.0.0.1:9776' -X POST -d 'message'. - Returning the messages in the same order as received for each client.
For example,
curl 'http://127.0.0.1:9776/?id=alice'.
Start the relay-server server
cargo run --bin relay-server
The default address is http://127.0.0.1:9776.
Integration Test
- Start the server
cargo run --bit relay-server - Run
./test.shin another terminal. - Close the server using
Ctrl+C.