Skip to content

comby-tools/comby-mutation-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

Install

npm install express body-parser @iarna/toml minimist

Server example

Add transformation rules

Put comby config files in rules. See examples there, which are used by default.

Running the server

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 port 5555. The default is 4448.
  • --retries N repicks a random mutation in the rules directory if the current one doesn't apply, up to N 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published