View sample_200_php_fpm.erl
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
<<"X-Powered-By: PHP/5.6.30\r\na: b\r\nb: b\r\nc: b\r\nd: b\r\ne: b\r\nf: b\r\nh: b\r\ni: b\r\nj: b\r\nk: b\r\nl: b\r\nm: b\r\nn: b\r\no: b\r\np: b\r\nq: b\r\nContent-type: text/html; charset=UTF-8\r\n\r\n">> | |
<<"<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n</html>">> |
View sample_404_php_fpm.erl
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
<<"Status: 404 Not Found\r\nX-Powered-By: PHP/5.6.30\r\nContent-type: text/html; charset=UTF-8\r\n\r\nFile not found.\n">> |
View erl_fastcgi_return_example.txt
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
{fast_cgi_stdout,600,<<"X-Powered-By: PHP/5.6.30\r\nContent-type: text/html; charset=UTF-8\r\n\r\n">>} | |
{fast_cgi_stdout,600,<<"<html>">>} | |
{fast_cgi_stdout,600,<<"</html>">>} | |
{fast_cgi_done,600} | |
{fastcgi_request_done,600,fast_cgi_connection_reset} |
View erl_fastcgi_test.erl
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
test() -> | |
Host = "127.0.0.1", | |
Port = 9000, | |
TryToReconnectEveryMillis = 1000, | |
% Start a persistant FastCGI connection to the application server | |
{ok, FastCGIConnection} = erl_fastcgi:start_link( | |
Host, Port, TryToReconnectEveryMillis | |
), |
View rebar.config
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
{deps, [ | |
{erl_fastcgi, {git, "git://github.com/marcelog/erl_fastcgi", {ref, "master"}}} | |
]}. |
View test.erl
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
-module(test). | |
-export([my_fun/1]). | |
my_fun(X) -> | |
my_other_fun(X) + 1. | |
my_other_fun(X) -> | |
X + 1. |
View run_test_module.log
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
$ erlc test.erl | |
$ ls -las test* | |
8 -rw-r--r-- 1 marcelog wheel 536 Oct 9 17:40 test.beam | |
8 -rw-r--r-- 1 marcelog wheel 104 Oct 9 17:40 test.erl | |
$ erl | |
Erlang/OTP 19 [erts-8.0] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] | |
Eshell V8.0 (abort with ^G) | |
1> test:my_fun(1). | |
3 |
View type_example.log
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
1> An_Atom = some_name. | |
some_name | |
2> A_List = [1, 2, An_Atom, <<1, 2, 3>>]. | |
[1,2,some_name,<<1,2,3>>] | |
3> Something_Like_A_Boolean = true. | |
true | |
4> A_Map = #{key1 => 1, key2 => A_List}. | |
#{key1 => 1,key2 => [1,2,some_name,<<1,2,3>>]} | |
5> A_Tuple = {1, 2, 3}. | |
{1,2,3} |
View pattern_match_log.txt
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
1> X = 1. | |
1 | |
2> X = 1. | |
1 | |
3> X = 2. | |
** exception error: no match of right hand side value 2 |
View sample_module.erl
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
-module(sample_module). |
NewerOlder