forked from ninenines/cowboy
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert the cookie example to a release
- Loading branch information
Showing
7 changed files
with
34 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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! |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
{release, {cookie_example, "1"}, [cookie]}. | ||
{extended_start_script, true}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,8 @@ | |
{applications, [ | ||
kernel, | ||
stdlib, | ||
cowboy | ||
cowboy, | ||
erlydtl | ||
]}, | ||
{mod, {cookie_app, []}}, | ||
{env, []} | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.