The above picture explains what happens when a message is sent and the server sees a match and than executes a script. It's important to note that the

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2024-12-28 18:00:02

The above picture explains what happens when a message is sent and the server sees a match and than executes a script. It's important to note that there can be more than one script attached to a subject. This is why you'll the CLI ask for a name for a script.

The server listens to port 7643 by default. You can push messages by doing a POST request to http://serverIP:7643/<subject> where the <subject> is any subjects that you have scripts registered to it.

msgscript is primarily designed to be used with Nix and NixOS (this is my personal use case). You can enable it in your NixOS configuration using the provided module (once included from either the flake or importing the module using something like niv or manually):

While I don't deploy it myself, this isn't to say that it's not possible to use msgscript outside of NixOS. Currently you'll have to build and run the server yourself.

Ensure these services are running and accessible to the msgscript server. The server and CLI can see the NATS_URL and ETCD_ENDPOINTS environment variables on top of the flags -etcdurl and -natsurl.

Leave a Comment