From b5d4cb91f80c833795a2d87050c3674bb7aecdc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 3 Oct 2017 13:39:41 +0200 Subject: Update Hugo, docs --- docs/en/gun/1.0/guide/start/index.html | 153 +++++++++++++++++---------------- 1 file changed, 80 insertions(+), 73 deletions(-) (limited to 'docs/en/gun/1.0/guide/start') diff --git a/docs/en/gun/1.0/guide/start/index.html b/docs/en/gun/1.0/guide/start/index.html index b0345edf..e7df8d53 100644 --- a/docs/en/gun/1.0/guide/start/index.html +++ b/docs/en/gun/1.0/guide/start/index.html @@ -7,7 +7,7 @@ - + Nine Nines: Starting and stopping @@ -67,84 +67,91 @@

Starting and stopping

-

This chapter describes how to start and stop the Gun application.

-
-

Setting up

-
-

Before Gun can be used it needs to be in Erlang’s ERL_LIBS path variable. -If you use erlang.mk or a similar build tool, you only need to specify -Gun as a dependency to your application and the tool will take care -of downloading Gun and setting up paths.

-

With erlang.mk this is done by adding gun to the DEPS variable -in your Makefile.

-
-
Adding Gun as an erlang.mk dependency
-
-
-
-
-

Starting

-
-

Gun is an OTP application. It needs to be started before you can -use it.

-
-
Starting Gun in an Erlang shell
-
-
1> application:ensure_all_started(gun).
-{ok,[ranch,crypto,cowlib,asn1,public_key,ssl,gun]}
-
-
-
-

Stopping

-
-

You can stop Gun using the application:stop/1 function, however -only Gun will be stopped. This is the equivalent of application:start/1. -The application_ensure_all_started/1 function has no equivalent for -stopping all applications.

-
-
Stopping Gun
-
-
application:stop(gun).
-
-
-
-

Using Gun with releases

-
-

An OTP release starts applications automatically. All you need -to do is to set up your application resource file so that Gun can -be included in the release. The application resource file can be -found in ebin/your_application.app, or in src/your_application.app.src -if you are using a build tool like erlang.mk.

-

The key you need to change is the applications key. By default -it only includes kernel and stdlib. You need to add gun to -that list.

-
-
Adding Gun to the application resource file
-
-
{applications, [
-        kernel,
-        stdlib,
-        gun
-]}
-

Do not put an extra comma at the end, the comma is a separator -between the elements of the list.

-
-
+

This chapter describes how to start and stop the Gun application.

+
+

Setting up

+
+

Before Gun can be used it needs to be in Erlang’s ERL_LIBS path variable. +If you use erlang.mk or a similar build tool, you only need to specify +Gun as a dependency to your application and the tool will take care +of downloading Gun and setting up paths.

+

With erlang.mk this is done by adding gun to the DEPS variable +in your Makefile.

+
+
Adding Gun as an erlang.mk dependency
+
+
DEPS = gun
+
+
+
+

Starting

+
+

Gun is an OTP application. It needs to be started before you can +use it.

+
+
Starting Gun in an Erlang shell
+
+
1> application:ensure_all_started(gun).
+{ok,[ranch,crypto,cowlib,asn1,public_key,ssl,gun]}
+
+
+
+

Stopping

+
+

You can stop Gun using the application:stop/1 function, however +only Gun will be stopped. This is the equivalent of application:start/1. +The application_ensure_all_started/1 function has no equivalent for +stopping all applications.

+
+
Stopping Gun
+
+
application:stop(gun).
+
+
+
+

Using Gun with releases

+
+

An OTP release starts applications automatically. All you need +to do is to set up your application resource file so that Gun can +be included in the release. The application resource file can be +found in ebin/your_application.app, or in src/your_application.app.src +if you are using a build tool like erlang.mk.

+

The key you need to change is the applications key. By default +it only includes kernel and stdlib. You need to add gun to +that list.

+
+
Adding Gun to the application resource file
+
+
{applications, [
+        kernel,
+        stdlib,
+        gun
+]}
+

Do not put an extra comma at the end, the comma is a separator +between the elements of the list.

+
+
+ + +