mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
improve docs and opam, tidy up for 0.1
This commit is contained in:
parent
8bfcf3673a
commit
f548041263
3 changed files with 6 additions and 3 deletions
|
|
@ -11,12 +11,14 @@
|
|||
features by declaring a few endpoints, including one for uploading files:
|
||||
|
||||
{[
|
||||
module S = Tiny_httpd
|
||||
|
||||
let () =
|
||||
let server = S.create () in
|
||||
(* say hello *)
|
||||
S.add_path_handler ~meth:`GET server
|
||||
"/hello/%s@/" (fun name _req -> S.Response.make_string (Ok ("hello " ^name ^"!\n")));
|
||||
"/hello/%s@/" (fun name _req ->
|
||||
S.Response.make_string (Ok ("hello " ^name ^"!\n")));
|
||||
(* echo request *)
|
||||
S.add_path_handler server
|
||||
"/echo" (fun req -> S.Response.make_string
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
(public_name http_of_dir)
|
||||
(package tiny_httpd)
|
||||
(flags :standard -warn-error -3)
|
||||
(libraries tiny_httpd str))
|
||||
(libraries tiny_httpd))
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ version: "0.1"
|
|||
authors: ["Simon Cruanes"]
|
||||
maintainer: "simon.cruanes.2007@m4x.org"
|
||||
license: "MIT"
|
||||
description: "Minimal HTTP server using good old threads"
|
||||
synopsis: "Minimal HTTP server using good old threads"
|
||||
build: [
|
||||
["dune" "build" "@install" "-p" name "-j" jobs]
|
||||
["dune" "build" "@doc" "-p" name] {with-doc}
|
||||
|
|
@ -20,3 +20,4 @@ homepage: "https://github.com/c-cube/tiny_httpd/"
|
|||
doc: "https://c-cube.github.io/tiny_httpd/"
|
||||
bug-reports: "https://github.com/c-cube/tiny_httpd/issues"
|
||||
dev-repo: "git+https://github.com/c-cube/tiny_httpd.git"
|
||||
post-messages: "tiny http server, with blocking IOs. Also ships with a `http_of_dir` program."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue