To try this example, you need GNU make
and git
in your PATH
.
If you don’t have HTTPie installed, use the appropriate cURL commands instead.
To build the example, run the following command:
make
To start the release in the foreground:
./_rel/ssl-hello-world-example/bin/ssl-hello-world-example console
Note: The previous command also starts an Erlang console.
To start the app and an LFE shell:
lfe -pa ebin -pa deps/*/ebin -s ssl-hello-world # make dev
Point your browser at http://localhost:8080.
http -v --verify=priv/ssl/cowboy-ca.crt https://localhost:8443
GET / HTTP/1.1
Connection: keep-alive
Host: localhost:8443
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: HTTPie/0.9.3
HTTP/1.1 200 OK
server: Cowboy
date: Tue, 05 Jan 2016 08:04:42 GMT
content-length: 12
content-type: text/plain
Hello world!