Using the erlang.mk gen_server template

I can never remember how to do this when the time comes, so here’s a note to future self:

make new t=gen_server n=foo_server

The generated file will be in src/foo_server.erl. You can also list all the available templates using:

make list-templates

Available templates: cowboy_http cowboy_loop cowboy_rest cowboy_ws gen_server ranch_protocol supervisor

Or just look at the source.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s