Skip to content

ksallberg/brunhilde

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
log
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

brunhilde (tested with Erlang OTP R21)

brunhilde is a minimal Erlang/OTP web server.

It can be embedded, or used standalone.

Dependencies:

Usage:

To start brunhilde standalone, do:

make build start

To embed brunhilde in another OTP application, see: brunhilde_ext.

For an example of a small (but covering POST, GET, redirects, etc), see: musiklistan.

Dialyzer:

make dialyzer (requires existing PLT)

Running virtual servers/apps:

Virtual servers are defined in servers/ and have to use the rest_handler behaviour. Give a list of virtual servers to start in brunhilde.conf.

For example:

#{start_observer => false,
  start_debugger => false,
  use_reloader   => true,
  servers =>
   [ #{server_name   => battleship,
       instance_name => battleship_serv,
       port          => 28251,
       workers       => 10,
       transport     => http}

   , #{server_name   => helloworld,
       instance_name => helloworld_serv,
       port          => 5030,
       workers       => 5,
       transport     => http}

   , #{server_name   => helloworld,
       instance_name => helloworld_serv2,
       port          => 5031,
       workers       => 10,
       transport     => http}

   , #{server_name   => secure,
       instance_name => secure_serv,
       port          => 4430,
       workers       => 10,
       transport     => {https,
                        "cert.pem",
                        "privkey.pem",
                        "fullchain.pem"
                        }
      }
   ]}.

Supervisor tree:

alt tag

Publishing to hex

  1. Update the version number in src/brunhilde.app.src
  2. Push the tag to git
  3. "make build"
  4. rebar3 hex publish

About

minimal HTTP/HTTPS/1.1 server

Resources

License

Stars

Watchers

Forks

Packages

No packages published