Skip to content

A really simple API to create Haproxy config files.

Notifications You must be signed in to change notification settings

arnikasky/haproxy_api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Haproxy API

##Installation:

$ bundle
$ rackup

Application 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.

About

A really simple API to create Haproxy config files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published