Skip to content

Commit

Permalink
Small changes in install sections
Browse files Browse the repository at this point in the history
  • Loading branch information
balat committed Dec 2, 2024
1 parent 13182ef commit 00c0378
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 36 deletions.
27 changes: 19 additions & 8 deletions tutos/8.0/manual/basics-server.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ opam install ocsigenserver
===Use as a library===

Let's create a new OCaml project with Dune:
{{{dune init project mysite}}}
{{{
dune init project mysite
}}}

To include a Web server in your OCaml program, just add
package {{{ocsigenserver}}} to your Dune file, together with all the extensions
Expand Down Expand Up @@ -173,20 +175,22 @@ HTML as strings. But we recommend to used typed-HTML instead (see below).

In this section, we will show how to compile and run a //server-side only// Web site by creating your project manually.

First, create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

===Build an executable===
This section shows how to create a static executable for you program
(without configuration file).

Run the following command:
{{{
opam install ocsipersist-sqlite-config eliom
dune init project --kind=lib mysite
cd mysite
}}}

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Add packages {{{ocsipersist-sqlite}}} and {{{eliom.server}}} to file
Expand Down Expand Up @@ -228,6 +232,13 @@ cd mysite

Add {{{(libraries eliom.server)}}} into file {{{lib/dune}}}.

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Create your {{{.ml}}} files in directory {{{lib}}}.
For example, copy the definition and registration of service {{{myservice}}} above.

Expand Down
31 changes: 21 additions & 10 deletions tutos/8.0/manual/basics.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ opam install ocsigenserver
===Use as a library===

Let's create a new OCaml project with Dune:
{{{dune init project mysite}}}
{{{
dune init project mysite
}}}

To include a Web server in your OCaml program, just add
package {{{ocsigenserver}}} to your Dune file, together with all the extensions
Expand Down Expand Up @@ -336,20 +338,22 @@ This example shows how to insert an image using {{{static_dir}}}:

In this section, we will show how to compile and run a //server-side only// Web site by creating your project manually.

First, create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

===Build an executable===
This section shows how to create a static executable for you program
(without configuration file).

Run the following command:
Run the following commands:
{{{
opam install ocsipersist-sqlite-config eliom
dune init project --kind=executable mysite
cd mysite
}}}

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Add packages {{{ocsipersist-sqlite}}} and {{{eliom.server}}} to file
Expand Down Expand Up @@ -386,7 +390,7 @@ load it dynamically into ocsigenserver using a configuration file.

{{{
opam install ocsipersist-sqlite-config eliom
dune init proj --kind=lib mysite
dune init project --kind=lib mysite
cd mysite
}}}

Expand All @@ -395,6 +399,13 @@ Add {{{(libraries eliom.server)}}} into file {{{lib/dune}}}.
Create your {{{.ml}}} files in directory {{{lib}}}.
For example, copy the definition and registration of service {{{myservice}}} above.

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Compile:
{{{
dune build
Expand Down
27 changes: 19 additions & 8 deletions tutos/dev/manual/basics-server.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ opam install ocsigenserver
===Use as a library===

Let's create a new OCaml project with Dune:
{{{dune init project mysite}}}
{{{
dune init project mysite
}}}

To include a Web server in your OCaml program, just add
package {{{ocsigenserver}}} to your Dune file, together with all the extensions
Expand Down Expand Up @@ -173,20 +175,22 @@ HTML as strings. But we recommend to used typed-HTML instead (see below).

In this section, we will show how to compile and run a //server-side only// Web site by creating your project manually.

First, create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

===Build an executable===
This section shows how to create a static executable for you program
(without configuration file).

Run the following command:
{{{
opam install ocsipersist-sqlite-config eliom
dune init project --kind=lib mysite
cd mysite
}}}

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Add packages {{{ocsipersist-sqlite}}} and {{{eliom.server}}} to file
Expand Down Expand Up @@ -228,6 +232,13 @@ cd mysite

Add {{{(libraries eliom.server)}}} into file {{{lib/dune}}}.

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Create your {{{.ml}}} files in directory {{{lib}}}.
For example, copy the definition and registration of service {{{myservice}}} above.

Expand Down
31 changes: 21 additions & 10 deletions tutos/dev/manual/basics.wiki
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,9 @@ opam install ocsigenserver
===Use as a library===

Let's create a new OCaml project with Dune:
{{{dune init project mysite}}}
{{{
dune init project mysite
}}}

To include a Web server in your OCaml program, just add
package {{{ocsigenserver}}} to your Dune file, together with all the extensions
Expand Down Expand Up @@ -336,20 +338,22 @@ This example shows how to insert an image using {{{static_dir}}}:

In this section, we will show how to compile and run a //server-side only// Web site by creating your project manually.

First, create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

===Build an executable===
This section shows how to create a static executable for you program
(without configuration file).

Run the following command:
Run the following commands:
{{{
opam install ocsipersist-sqlite-config eliom
dune init project --kind=executable mysite
cd mysite
}}}

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Add packages {{{ocsipersist-sqlite}}} and {{{eliom.server}}} to file
Expand Down Expand Up @@ -386,7 +390,7 @@ load it dynamically into ocsigenserver using a configuration file.

{{{
opam install ocsipersist-sqlite-config eliom
dune init proj --kind=lib mysite
dune init project --kind=lib mysite
cd mysite
}}}

Expand All @@ -395,6 +399,13 @@ Add {{{(libraries eliom.server)}}} into file {{{lib/dune}}}.
Create your {{{.ml}}} files in directory {{{lib}}}.
For example, copy the definition and registration of service {{{myservice}}} above.

Create the directories will we use for data (logs, etc.):
{{{
mkdir -p local/var/log/mysite
mkdir -p local/var/data/mysite
mkdir -p local/var/run
}}}

Compile:
{{{
dune build
Expand Down

0 comments on commit 00c0378

Please sign in to comment.