mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
rename to tiny_httpd
This commit is contained in:
parent
49b46b1c4e
commit
3c5189a663
9 changed files with 28 additions and 14 deletions
21
README.md
21
README.md
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
# SimpleHTTPServer [](https://travis-ci.org/c-cube/simplehttpserver)
|
||||
# Tiny_httpd [](https://travis-ci.org/c-cube/tiny_httpd)
|
||||
|
||||
Minimal HTTP server using good old threads and `Scanf` for routing.
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ The basic echo server from `src/examples/echo.ml`:
|
|||
|
||||
```ocaml
|
||||
|
||||
module S = SimpleHTTPServer
|
||||
module S = Tiny_httpd
|
||||
|
||||
let () =
|
||||
let server = S.create () in
|
||||
|
|
@ -46,6 +46,21 @@ echo:
|
|||
|
||||
```
|
||||
|
||||
## `http_of_dir`
|
||||
|
||||
Similar to `python -m http.server`, a simple program `http_of_dir` is provided.
|
||||
It serves files from the current directory.
|
||||
|
||||
```sh
|
||||
$ http_of_dir . -p 8080 &
|
||||
$ curl -X GET http://localhost:8080
|
||||
...
|
||||
some html
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
|
||||
## Why?
|
||||
|
||||
Why not? If you just want a super basic local server (perhaps for exposing
|
||||
|
|
@ -54,7 +69,7 @@ dependencies or high scalability libraries.
|
|||
|
||||
## Documentation
|
||||
|
||||
See https://c-cube.github.io/simplehttpserver/
|
||||
See https://c-cube.github.io/tiny_httpd
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
(name http_of_dir)
|
||||
(public_name http_of_dir)
|
||||
(flags :standard -warn-error -3)
|
||||
(libraries simplehttpserver str))
|
||||
(libraries tiny_httpd str))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
module S = SimpleHTTPServer
|
||||
module S = Tiny_httpd
|
||||
module Pf = Printf
|
||||
|
||||
let contains_dot_dot s =
|
||||
|
|
|
|||
4
src/dune
4
src/dune
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
(library
|
||||
(name simplehttpserver)
|
||||
(public_name simplehttpserver)
|
||||
(name tiny_httpd)
|
||||
(public_name tiny_httpd)
|
||||
(libraries threads)
|
||||
(wrapped false))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
(executables
|
||||
(names echo)
|
||||
(libraries simplehttpserver))
|
||||
(libraries tiny_httpd))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
module S = SimpleHTTPServer
|
||||
module S = Tiny_httpd
|
||||
|
||||
let debug_ k =
|
||||
if None<>Sys.getenv_opt "HTTP_DBG" then (
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
opam-version: "2.0"
|
||||
name: "simplehttpserver"
|
||||
version: "0.1"
|
||||
authors: ["Simon Cruanes"]
|
||||
maintainer: "simon.cruanes.2007@m4x.org"
|
||||
|
|
@ -17,7 +16,7 @@ depends: [
|
|||
"odoc" {with-doc}
|
||||
]
|
||||
tags: [ "http" "thread" "server" ]
|
||||
homepage: "https://github.com/c-cube/simplehttpserver/"
|
||||
doc: "https://c-cube.github.io/simplehttpserver/"
|
||||
bug-reports: "https://github.com/c-cube/simplehttpserver/issues"
|
||||
dev-repo: "git+https://github.com/c-cube/simplehttpserver.git"
|
||||
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"
|
||||
Loading…
Add table
Reference in a new issue