Skip to content

nbrandaleone-gcp/send-chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

send-msg

This programs send a random phrase to a web chat program. It was created for testing purposes, to generate useful traffic. The phrase is converted into a JSON structure and then sent via HTTP POST. The program waits a few (random) seconds and then loops forever, until the user stops the program with SIGINT or SIGTERM.

The chat program source code is on GitHub here: https://github.com/nbrandaleone-gcp/kemal-redis-chat

Installation

Follow Crystal installation instuctions.

Usage

crystal run src/send-chat.cr -- -u http://localhost:3000/msg
send-chat -u http://localhost:3000/msg

Or, if you prefer a pre-built docker container:

docker run --rm nbrand/send-chat:0.1 -u <URL>/msg

Important

You MUST add /msg to the end of URL, in order for the chat server to process the incoming messages. Otherwise, the data hits the main web page of the chat server, and is ignored. 'msg' is a dedicated API endpoint that handles JSON input.

Development

TODO: Write development instructions here

Contributing

  1. Fork it (https://github.com/your-github-user/send-msg/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published