rename to tiny_httpd

This commit is contained in:
Simon Cruanes 2019-11-17 12:18:15 -06:00
parent 49b46b1c4e
commit 3c5189a663
9 changed files with 28 additions and 14 deletions

View file

@ -1,5 +1,5 @@
# SimpleHTTPServer [![build status](https://travis-ci.org/c-cube/simplehttpserver.svg?branch=master)](https://travis-ci.org/c-cube/simplehttpserver)
# Tiny_httpd [![build status](https://travis-ci.org/c-cube/tiny_httpd.svg?branch=master)](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

View file

@ -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))

View file

@ -1,5 +1,5 @@
module S = SimpleHTTPServer
module S = Tiny_httpd
module Pf = Printf
let contains_dot_dot s =

View file

@ -1,6 +1,6 @@
(library
(name simplehttpserver)
(public_name simplehttpserver)
(name tiny_httpd)
(public_name tiny_httpd)
(libraries threads)
(wrapped false))

View file

@ -1,4 +1,4 @@
(executables
(names echo)
(libraries simplehttpserver))
(libraries tiny_httpd))

View file

@ -1,5 +1,5 @@
module S = SimpleHTTPServer
module S = Tiny_httpd
let debug_ k =
if None<>Sys.getenv_opt "HTTP_DBG" then (

View file

@ -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"