Navigation Menu

Skip to content

Commit

Permalink
Convert the cookie example to a release
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Sep 7, 2013
1 parent 2f25c65 commit 340f0a5
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 37 deletions.
15 changes: 15 additions & 0 deletions examples/cookie/Makefile
@@ -0,0 +1,15 @@
PROJECT = cookie

DEPS = cowboy erlydtl
dep_cowboy = pkg://cowboy master
dep_erlydtl = pkg://erlydtl master

.PHONY: release clean-release

release: clean-release all
relx

clean-release:
rm -rf _rel

include ../../erlang.mk
27 changes: 15 additions & 12 deletions examples/cookie/README.md
@@ -1,18 +1,21 @@
Cowboy Cookie
=============
Cookie 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:

You can then start the Erlang node with the following command:
``` bash
$ make
```
./start.sh

To start the release in the foreground:

``` bash
$ ./_rel/bin/cookie_example console
```

Then point your browser to the indicated URL. This example allows
you to use any path you want to try to show that cookies are defined
site-wide. Try it in your browser!
Then point your browser at [http://localhost:8080](http://localhost:8080).
This example allows you to use any path to show that the cookies
are defined site-wide. Try it!
6 changes: 0 additions & 6 deletions examples/cookie/rebar.config

This file was deleted.

2 changes: 2 additions & 0 deletions examples/cookie/relx.config
@@ -0,0 +1,2 @@
{release, {cookie_example, "1"}, [cookie]}.
{extended_start_script, true}.
3 changes: 2 additions & 1 deletion examples/cookie/src/cookie.app.src
Expand Up @@ -8,7 +8,8 @@
{applications, [
kernel,
stdlib,
cowboy
cowboy,
erlydtl
]},
{mod, {cookie_app, []}},
{env, []}
Expand Down
15 changes: 0 additions & 15 deletions examples/cookie/src/cookie.erl

This file was deleted.

3 changes: 0 additions & 3 deletions examples/cookie/start.sh

This file was deleted.

0 comments on commit 340f0a5

Please sign in to comment.