Add an entry to the middlewares
. Usually you want to keep the standard Cowboy
handlers afterwards, but you can replace them if you want.
{ok, Pid} = cowboy:start_clear(ListenerName,
[{port, Port}],
#{
env => #{dispatch => Dispatch},
-module(). | |
-behavior(gen_server). | |
% API | |
-export([start_link/0]). | |
% Callbacks | |
-export([init/1]). | |
-export([handle_call/3]). |
# Load Order Interactive Interactive Script | |
# Startup Only login Always | |
# ------------- ----------- ----------- ------ | |
# /etc/zshenv 1 1 1 | |
# ~/.zshenv 2 2 2 | |
# /etc/zprofile 3 | |
# ~/.zprofile 4 | |
# /etc/zshrc 5 3 | |
# ~/.zshrc 6 4 | |
# /etc/zlogin 7 |
-module(). | |
-behavior(gen_event). | |
% Callbacks | |
-export([init/1]). | |
-export([handle_event/2]). | |
-export([handle_call/2]). | |
-export([handle_info/2]). | |
-export([terminate/2]). |
To build and test Erlang projects on GitHub actions with Rebar it is fastest to use the setup-beam action and use caching.
To get started, create a workflow file in .github/workflows
in your
repository. For this example we use a file called
.github/workflows/continuous_integration.yml
.
chrome
chrome
named userChrome.css
and paste the contentabout:config
in Firefoxtoolkit.legacyUserProfileCustomizations.stylesheets
to true
Erlang makes it possible to extend the Erlang shell with your own built-in functions using the special module user_default
. We can use this to add functions to the shell, and even add custom libraries to the code path for all Erlang shells.
.erlang
in your home directory. Any Erlang expression ending with a dot in this file will be executed when the Erlang shell starts~/.erlang.d
:
$ mkdir ~/.erlang.d