~ubuntu-branches/ubuntu/oneiric/ocsigen/oneiric

« back to all changes in this revision

Viewing changes to eliom/eliom_extension_template.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stephane Glondu
  • Date: 2009-07-02 10:02:08 UTC
  • mfrom: (1.1.9 upstream) (4.1.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090702100208-n158b1sqwzn0asil
Tags: 1.2.0-2
Fix build on non-native architectures

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(* Ocsigen
 
2
 * http://www.ocsigen.org
 
3
 * Module extensiontemplate.ml
 
4
 * Copyright (C) 2007 Vincent Balat
 
5
 * CNRS - Universit� Paris Diderot Paris 7
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify
 
8
 * it under the terms of the GNU Lesser General Public License as published by
 
9
 * the Free Software Foundation, with linking exception;
 
10
 * either version 2.1 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This program is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
15
 * GNU Lesser General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Lesser General Public License
 
18
 * along with this program; if not, write to the Free Software
 
19
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
20
 *)
 
21
(*****************************************************************************)
 
22
(*****************************************************************************)
 
23
(* This is an example of extension for Ocsigen                               *)
 
24
(* Take this as a template for writing your own Eliom based
 
25
   extensions to the Web server *)
 
26
(*****************************************************************************)
 
27
(*****************************************************************************)
 
28
 
 
29
let _ = 
 
30
  Eliom_extensions.register_eliom_extension
 
31
    (fun sp ->
 
32
      Lwt.return 
 
33
        (Ocsigen_extensions.Ext_found
 
34
           (fun () ->
 
35
              let content = "Eliom Extension template page" in
 
36
              Ocsigen_senders.Text_content.result_of_content
 
37
                (content, "text/plain"))))
 
38
 
 
39