This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
README.markdown | Thu Jan 22 13:00:29 -0800 2009 | |
| |
config | Sun Jan 11 21:31:23 -0800 2009 | |
| |
demo.erl | Thu Jan 22 13:00:29 -0800 2009 | |
| |
ngx_http_erlang_module.c | Thu Jan 22 13:00:29 -0800 2009 |
README.markdown
This is an experimental erlang extension for nginx.
Contributions are welcome. I don't claim to write beautiful c. The biggest thing you can do to help is to show me what I did wrong (nicely) so I can learn from it.
Build
From the nginx source directory, configure nginx with the module included.
$ ./configure --add-module=/path/to/erlang_nginx
$ make
$ make install
Meanwhile
$ erl -setcookie secret -sname handler@localhost
1> P = demo:start().
<x.x.x>
Running nginx and making a curl request ala
$ curl http://localhost/foobar
This...
Results in this output in Erlang:
{Pid, Method, Uri}: {<8207.9.0>, 2, "/foo" ++ _}
Configuration
location /app/ {
erlang;
}
TODO
- ngx_http_erlang_module.c (66) - Get this from nginx.
- ngx_http_erlang_module.c (69) - Set this during the erlang message recieve loop.
- ngx_http_erlang_module.c (82) - Add secret to config
- ngx_http_erlang_module.c (88) - Add node name to config
- ngx_http_erlang_module.c (89) - Add node host to config
- ngx_http_erlang_module.c (97) - Send the headers and request body
- ngx_http_erlang_module.c (103) - Set the registered process that is the handler in the config.
- ngx_http_erlang_module.c (106) - Find a way to fail gracefully if a message isn't recieved within
- ngx_http_erlang_module.c (108) - Set the timeout duration in config.
- ngx_http_erlang_module.c (120) - Handle response tuple: {StatusCode, Headers, Body}
- ngx_http_erlang_module.c (126) - Set status code from response tuple
License
This software is Open Source under the MIT license.







