This project is (initially) generated by eliom-distillery as the basic
project project_name. This version of the build system creates the
app as a library to be loaded dynamically into ocsigenserver
using a configuration file.
The following files in this directory have been generated by eliom-distillery:
-
project_name.eliom This is your initial source file.
-
static/ The content of this folder is statically served. Put your CSS or additional JavaScript files here
-
Makefile.options Configure your project here
-
project_name.conf.in This file is a template for the configuration file for ocsigenserver. You will rarely have to edit itself - it takes its variables from the Makefile.options. This way, the installation rules and the configuration files are synchronized with respect to the different folders.
-
Makefile This contains all rules necessary to build, test, and run your Eliom application. You better don't touch it ;) See below for the relevant targets.
-
local/ This directory is the target of the temporary installation of your application, to test locally before doing a system-wide installation in /. Do not put anything manually here.
Here's some help on how to work with this basic distillery project:
-
Test your application by compiling it and running ocsigenserver locally $ make test.byte (or test.opt)
-
Compile it only $ make all (or byte or opt)
-
Deploy your project on your system $ make install (or install.byte or install.opt)
-
Run the server on the deployed project $ make run.byte (or run.opt)
If you want to use a global install, update PREFIX in Makefile.options
and run make install as root. If OCaml/Eliom is not installed
globally, you will need to re-export some environment variables to make
this work:
sudo PATH=$PATH OCAMLPATH=$OCAMLPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make run.opt