Using the 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.

Leave a Reply

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

You are commenting using your 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 )

Connecting to %s