From 00c037808d5271349a770b9ef3d5d9f92961cfa1 Mon Sep 17 00:00:00 2001 From: Vincent Balat Date: Mon, 2 Dec 2024 16:32:32 +0100 Subject: [PATCH] Small changes in install sections --- tutos/8.0/manual/basics-server.wiki | 27 +++++++++++++++++-------- tutos/8.0/manual/basics.wiki | 31 +++++++++++++++++++---------- tutos/dev/manual/basics-server.wiki | 27 +++++++++++++++++-------- tutos/dev/manual/basics.wiki | 31 +++++++++++++++++++---------- 4 files changed, 80 insertions(+), 36 deletions(-) diff --git a/tutos/8.0/manual/basics-server.wiki b/tutos/8.0/manual/basics-server.wiki index 96896817..39f5ca25 100644 --- a/tutos/8.0/manual/basics-server.wiki +++ b/tutos/8.0/manual/basics-server.wiki @@ -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 @@ -173,13 +175,6 @@ 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). @@ -187,6 +182,15 @@ This section shows how to create a static executable for you program 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 @@ -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. diff --git a/tutos/8.0/manual/basics.wiki b/tutos/8.0/manual/basics.wiki index bc3774b9..0238f3de 100644 --- a/tutos/8.0/manual/basics.wiki +++ b/tutos/8.0/manual/basics.wiki @@ -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 @@ -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 @@ -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 }}} @@ -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 diff --git a/tutos/dev/manual/basics-server.wiki b/tutos/dev/manual/basics-server.wiki index 96896817..39f5ca25 100644 --- a/tutos/dev/manual/basics-server.wiki +++ b/tutos/dev/manual/basics-server.wiki @@ -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 @@ -173,13 +175,6 @@ 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). @@ -187,6 +182,15 @@ This section shows how to create a static executable for you program 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 @@ -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. diff --git a/tutos/dev/manual/basics.wiki b/tutos/dev/manual/basics.wiki index bc3774b9..0238f3de 100644 --- a/tutos/dev/manual/basics.wiki +++ b/tutos/dev/manual/basics.wiki @@ -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 @@ -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 @@ -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 }}} @@ -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