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.