CrowdHailer / raxx

Interface for HTTP webservers, frameworks and clients
https://hexdocs.pm/raxx
Apache License 2.0
402 stars 29 forks source link

Added ssl init function #32

Closed CharlesOkwuagwu closed 7 years ago

CharlesOkwuagwu commented 7 years ago

The raxx_cowboy example would need this modification as well to run ssl

def start(_type, args) do routes = [ {:, Raxx.Cowboy.Handler, {MODULE, []}} ]

dispatch = :cowboy_router.compile([{:_, routes}])

opts = [ port: 88,
      keyfile: "C:/Elixir/webraxx/config/paperless_bots.key",
     certfile: "C:/Elixir/webraxx/config/paperless_bots.pem",
       dhfile: "C:/Elixir/webraxx/config/dhparams.pem"]

env = [dispatch: dispatch]

# Don't forget can set any name
{:ok, _pid} = :cowboy.start_https(:https, 100, opts, [env: env])

end

CrowdHailer commented 7 years ago

Will do a new release of raxx_cowboy in a bit.

Lets open a new issue relating to upgrading once elli has made the change