Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chatziko/pico
simple web server
https://github.com/chatziko/pico
Last synced: about 2 months ago
JSON representation
simple web server
- Host: GitHub
- URL: https://github.com/chatziko/pico
- Owner: chatziko
- Created: 2019-05-19T02:59:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-30T06:49:57.000Z (over 1 year ago)
- Last Synced: 2024-10-27T12:40:39.404Z (3 months ago)
- Language: C
- Size: 37.1 KB
- Stars: 2
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Pico HTTP Server in C
This is a very simple HTTP server for Unix, using `fork()`. It's very easy to use.
## How to use
1. Include header `httpd.h`.
2. Write your route method, handling requests.
3. Call `serve_forever("8000")` to start serving on http://127.0.0.1:8000/.See `main.c`, an interesting example.
To log stuff, use `fprintf(stderr, "message");`
View `httpd.h` for more information.
## Test example
Open http://localhost:8000/test in browser to see request headers.
## Links
Reworked and refactored from .
Based on .