eatonphil/owebl

语言: OCaml

git: https://github.com/eatonphil/owebl

OCaml,Meet Web。
OCaml, Meet Web.
README.md (中文)

OWebl

不要使用这个!

如果您正在考虑编写OCaml Web应用程序,请重新考虑!在OCaml中,存在具有可怕接口的高性能Web框架,并且还存在具有漂亮接口的可怕Web框架(这一个)。在撰写本文时,我还没有找到兼具两者的OCaml Web框架!

介绍

Build Status

OWebl是OCaml的简单Web框架。虽然其他框架确实存在 为了在OCaml(ocsigen,js_of_caml)中编写Web应用程序,这些是 庞大而难以操纵。

看看它的易用性:

open Response
open Rule
open Server

let handler =
    Handler.create
        (StaticRouteRule.create "/" [Verb.GET])
        (SimpleResponse.create "Hello World!")

let server = SimpleServer.serve [handler]

要构建示例服务器:

$ ocamlbuild -libs unix,str -Is src examples/simple_server/main.native
$ ./main.native

或者,要在系统范围内安装:

$ make && make install

例子

查看示例目录!

这些也包含在makefile中,可以轻松构建和运行:

  • make fileserver && ./main.native
  • make templateserver && ./main.native

特征

  • 简单的界面
  • 通过分叉的多个并发请求
  • 字符串和函数模板支持

安装

通过运行安装OWebl:

$ git clone https://github.com/eatonphil/owebl

要构建,只需包含Unix和Str模块并引用路径即可 你的ocamlbuild行中的owebl / src:

$ ocamlbuild -libs unix,str -Is path/to/owebl/src my_server.native

或者根据需要编辑simpleserver的包含makefile条目。

有助于

  • 问题跟踪器:github.com/eatonphil/owebl/issues
  • 源代码:github.com/eatonphil/owebl
  • 邮件列表:https://groups.google.com/forum/#!forum / owebl

支持

如果您遇到问题,请告诉我们。如有任何可能有助于普通观众的问题,请使用邮件列表。

执照

该项目根据BSD许可证授权。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

OWebl

DON'T USE THIS!

If you are considering writing OCaml web applications, reconsider! In OCaml, there are performant web frameworks with terrible interfaces and there are also terrible web frameworks with pretty interfaces (this one). At the time of writing, I have not found an OCaml web framework that has both!

Introduction

Build Status

OWebl is a simple web framework for OCaml. While other frameworks do exist
for writing web applications in OCaml (ocsigen, js_of_caml), these are
massive and difficult to maneuver.

Look at how easy it is to use:

open Response
open Rule
open Server

let handler =
    Handler.create
        (StaticRouteRule.create "/" [Verb.GET])
        (SimpleResponse.create "Hello World!")

let server = SimpleServer.serve [handler]

To build the example server:

$ ocamlbuild -libs unix,str -Is src examples/simple_server/main.native
$ ./main.native

Alternatively, to install system-wide:

$ make && make install

Examples

See the example directories!

These are also included in the makefile and can be easily built and run:

  • make fileserver && ./main.native
  • make templateserver && ./main.native

Features

  • Simple interface
  • Multiple concurrent requests via forking
  • String and function templating support

Installation

Install OWebl by running:

$ git clone https://github.com/eatonphil/owebl

To build, simply include Unix and Str modules and reference the path
to owebl/src in your ocamlbuild line:

$ ocamlbuild -libs unix,str -Is path/to/owebl/src my_server.native

Or edit included makefile entry for simpleserver to your needs.

Contribute

Support

If you are having issues, please let us know. Please use the mailing list for any questions that may help the general audience.

License

The project is licensed under the BSD license.