Skip to content

canonici/ocsimooc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instructions
============

This project is (initially) generated by eliom-distillery as the basic
project "ocsimooc".

Generally, you can compile it and run ocsigenserver on it by
  $ make db-init
  $ make db-create
  $ make db-update
  $ make test.byte (or test.opt)
Then connect to http://localhost:8080 to see the running app skeleton.
Registration will work only if sendmail if configured on your system.
But the default template will print the activation link on the standard
output to make possible for you to create your first users (remove this!).

See below for other useful targets for make.

Generated files
---------------

The following files in this directory have been generated by
eliom-distillery:

 - ocsimooc*.eliom[i]
   Initial source file of the project.
   All Eliom files (*.eliom, *.eliomi) in this directory are
   automatically compiled and included in the application.
   To add a .ml/.mli file to your project,
   append it to the variable SERVER_FILES or CLIENT_FILES in Makefile.options.

 - static/
   This folder contains the static data for your Website.
   The content will be copied into the static file directory of the server.
   Put your CSS or additional JavaScript files here.

 - Makefile.options
   Configure your project here.

 - ocsimooc.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.

 - mobile
   The files needed by Cordova mobile apps

 - Makefile
   This contains all rules necessary to build, test, and run your
   Eliom application. See below for the relevant targets.

 - README


Makefile targets
----------------

Here's some help on how to work with this basic distillery project:

 - Initialize, start, create, stop, delete a local db, or show status:
     $ make db-init
     $ make db-start
     $ make db-create
     $ make db-stop
     $ make db-delete
     $ make db-status

 - 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
     $ sudo make install (or install.byte or install.opt)

 - Run the server on the deployed project
     $ sudo make run.byte (or run.opt)

   If WWWUSER in the Makefile.options is you, you don't need the
   `sudo'. If Eliom isn't installed globally, however, you need to
   re-export some environment variables to make this work:
     $ sudo PATH=$PATH OCAMLPATH=$OCAMLPATH LD_LIBRARY_PATH=$LD_LIBRARY_PATH make run.byte/run.opt

 - If you need a findlib package in your project, add it to the
   variables SERVER_PACKAGES and/or CLIENT_PACKAGES. The configuration
   file will be automatically updated.

 - Mobile app: Have a look in Makefile.mobile to see how to install
   the requested packages to build a mobile application,
   and the makefile rules to build and test it.

Use Camlp4 syntax
-----------------

The project is configured for using the PPX Eliom syntax. If you need
to use Camlp4, you need to provide custom targets. For example, to use
Camlp4 for the file foo_p4.eliom, add the following targets to the end
of Makefile.local:

  $(DEPSDIR)/foo_p4.eliom.server: foo_p4.eliom | $(DEPSDIR)
          $(ELIOMDEP) -server $(SERVER_INC) $< > $@

  $(DEPSDIR)/foo_p4.eliom.client: foo_p4.eliom | $(DEPSDIR)
          $(ELIOMDEP) -client $(CLIENT_INC) $< > $@

  ${ELIOM_TYPE_DIR}/foo_p4.type_mli: foo_p4.eliom
          ${ELIOMC} -infer ${SERVER_INC} $<

  ${ELIOM_SERVER_DIR}/foo_p4.cmo: foo_p4.eliom
          ${ELIOMC} -c ${SERVER_INC} $(GENERATE_DEBUG) $<

  ${ELIOM_SERVER_DIR}/foo_p4.cmx: foo_p4.eliom
          ${ELIOMOPT} -c ${SERVER_INC} $(GENERATE_DEBUG) $<

  ${ELIOM_CLIENT_DIR}/foo_p4.cmo: foo_p4.eliom
          ${JS_OF_ELIOM} -c ${CLIENT_INC} $(GENERATE_DEBUG) $<

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors