npm install express body-parser @iarna/toml minimist
Put comby config files in rules
. See examples there, which are used by default.
Start the server:
$ export NODE_OPTIONS="--max-old-space-size=8192"
$ node server.js
[+] Loaded 109 transformation rules
[+] Mutation server listening at http://:::4448
Parameters and defaults
Flags that matter:
--port 5555
manually specify to listne on port5555
. The default is4448
.--retries N
repicks a random mutation in therules
directory if the current one doesn't apply, up toN
times.--debug
prints out various debug info: source received, transformations picked and applied, etc.
Other supported flags can be listed with node server.js --help
.
Testing and debugging
Start the server: node server.js --debug
. Then, a separate terminal:
curl -d '{1} {2} {3} [a] [b] (*) (&) (%, $)' -H "Content-Type: text/plain" -X POST http://localhost:4448/mutate
Where '...'
is taken as the source. Do this a couple of times until a rule can fire. See server output for debug messages.