mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 12:40:25 +00:00
Convert the SSL hello world example to a release
This commit is contained in:
parent
1f8119ef31
commit
24a22fa657
9 changed files with 42 additions and 40 deletions
|
@ -1,23 +1,27 @@
|
|||
Cowboy Hello World
|
||||
==================
|
||||
Hello world example
|
||||
===================
|
||||
|
||||
To compile this example you need rebar in your PATH.
|
||||
To try this example, you need GNU `make`, `git` and
|
||||
[relx](https://github.com/erlware/relx) in your PATH.
|
||||
|
||||
Type the following command:
|
||||
```
|
||||
$ rebar get-deps compile
|
||||
To build the example, run the following command:
|
||||
|
||||
``` bash
|
||||
$ make
|
||||
```
|
||||
|
||||
You can then start the Erlang node with the following command:
|
||||
```
|
||||
./start.sh
|
||||
To start the release in the foreground:
|
||||
|
||||
``` bash
|
||||
$ ./_rel/bin/ssl_hello_world_example console
|
||||
```
|
||||
|
||||
Then point your browser to the indicated URL. You will need to temporarily
|
||||
trust the root certificate authority in `priv/ssl/cowboy-ca.crt`.
|
||||
Then point your browser at [http://localhost:8443](http://localhost:8443).
|
||||
You will need to temporarily trust the root certificate authority,
|
||||
which can also be found in `priv/ssl/cowboy-ca.crt`.
|
||||
|
||||
Example
|
||||
-------
|
||||
Example output
|
||||
--------------
|
||||
|
||||
``` bash
|
||||
$ curl --cacert priv/ssl/cowboy-ca.crt -i https://localhost:8443
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue