This chapter describes how to start and stop the Gun application.
Specify Gun as a dependency to your application in your favorite build tool.
With Erlang.mk this is done by adding gun to the DEPS variable in your Makefile.
Gun is an OTP application. It needs to be started before you can use it.
1> application:ensure_all_started(gun).
{ok,[crypto,cowlib,asn1,public_key,ssl,gun]}
You can stop Gun using the application:stop/1 function, however only Gun will be stopped. This is the reverse of application:start/1. The application_ensure_all_started/1 function has no equivalent for stopping all applications.
application:stop(gun).
Support my work on Cowboy, Ranch, Gun and Erlang.mk via GitHub Sponsors. The funds cover domain names and development tools.