Ocsigen Start demo app

Links, services and static files

Services

Have a look at file osdemo_services.eliom to see some examples of service definitions. Most service handlers are defined in file osdemo_handlers.eliom. Service registration is done in osdemo.eliom. Have a look to see how to define a service returning an application page, an action or a redirection, etc. Read Ocsigen's tutorials and Eliom's manual for more information about services.

Links and forms

Here is an example of an internal link, and an example of link towards an external service.

Static files

Use service static_dir (predefined in Eliom) to create links towards static files (images, fonts, etc.). Put static files you want to include in the mobile app in directory static. They will be stored locally on the mobile device. By default, links are relative on the Web app and absolute on the mobile app. For example, here is an example of an image stored locally in the mobile app:

local_img

and a remote image:

distant_img