#Haproxy API
##Installation:
$ bundle
$ rackupApplication will be running on localhost:9292.
##Usage:
Do a POST to localhost:9292/config with a JSON such as:
{
"config":{
"frontends":[
{
"title":"localnodes",
"default_backend":"backend"
}
],
"backends":[
{
"title":"backend",
"servers":[
{
"weight":10.0,
"port":8080,
"name":"one_server",
"host":"localhost"
},
{
"weight":90.0,
"port":8081,
"name":"another_server",
"host":"localhost"
}
]
}
]
}
}The result will be in ./template/haproxy.cfg.