Skip to content

Latest commit

 

History

History

ssl-hello-world

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

SSL hello world example

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.

Building

To build the example, run the following command:

make

Starting

Release

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.

LFE

To start the app and an LFE shell:

lfe -pa ebin -pa deps/*/ebin -s ssl-hello-world # make dev

Usage

Point your browser at http://localhost:8080.

Example output

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!