All Projects → foxweb → pico

foxweb / pico

Licence: MIT license
This is a very simple HTTP server for Unix, using fork(). It's very easy to use.

Programming Languages

c
50402 projects - #5 most used programming language
CSS
56736 projects
HTML
75241 projects
javascript
184084 projects - #8 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to pico

Cxxhttp
Asynchronous, Header-only C++ HTTP-over-(TCP|UNIX Socket|STDIO) Library
Stars: ✭ 24 (-71.08%)
Mutual labels:  unix, http-server
PengueeBot
Automation tool, visit our discord channel if you have anything to ask
Stars: ✭ 27 (-67.47%)
Mutual labels:  unix
Lightdm Webkit2 Theme Glorious
A sleek, modern and glorified LightDM webkit2 theme
Stars: ✭ 236 (+184.34%)
Mutual labels:  unix
go-sysconf
sysconf for Go, without using cgo
Stars: ✭ 119 (+43.37%)
Mutual labels:  unix
dot-elvish
My configuration files for elvish - mirrored from GitLab
Stars: ✭ 43 (-48.19%)
Mutual labels:  unix
sudden.js
A high-level API framework built on top of express.
Stars: ✭ 14 (-83.13%)
Mutual labels:  http-server
Ventoy
A new bootable USB solution.
Stars: ✭ 29,413 (+35337.35%)
Mutual labels:  unix
bf256
Brainfuck compiler under 256 bytes in size.
Stars: ✭ 21 (-74.7%)
Mutual labels:  unix
ValaSimpleHTTPServer
Simple HTTP server made in vala
Stars: ✭ 49 (-40.96%)
Mutual labels:  http-server
cpphttpstack
c++ api for http client & server
Stars: ✭ 30 (-63.86%)
Mutual labels:  http-server
Advanced-xv6
Modern improvements for MIT's xv6 OS
Stars: ✭ 26 (-68.67%)
Mutual labels:  unix
teapot
Utilities for working with HTTP status codes, errors, and more
Stars: ✭ 14 (-83.13%)
Mutual labels:  http-server
reqres
Powerful classes for http requests and responses
Stars: ✭ 36 (-56.63%)
Mutual labels:  http-server
The Art Of Command Line
Master the command line, in one page
Stars: ✭ 100,482 (+120962.65%)
Mutual labels:  unix
Ocamlapi
Path-based http request routing in Ocaml.
Stars: ✭ 19 (-77.11%)
Mutual labels:  http-server
Cproc
C11 compiler (mirror)
Stars: ✭ 238 (+186.75%)
Mutual labels:  unix
newrelic-unix-monitor
Monitoring service for Unix (AIX, Linux, HP-UX, MacOS, Solaris) systems
Stars: ✭ 26 (-68.67%)
Mutual labels:  unix
EthernetWebServer SSL
Simple TLS/SSL Ethernet WebServer, HTTP Client and WebSocket Client library for for AVR, Portenta_H7, Teensy, SAM DUE, SAMD21, SAMD51, STM32F/L/H/G/WB/MP1, nRF52 and RASPBERRY_PI_PICO boards using Ethernet shields W5100, W5200, W5500, ENC28J60 or Teensy 4.1 NativeEthernet/QNEthernet. It now supports Ethernet TLS/SSL Client. The library supports …
Stars: ✭ 40 (-51.81%)
Mutual labels:  http-server
Kvantum
An intellectual (HTTP/HTTPS) web server with support for server side templating (Crush, Apache Velocity and JTwig)
Stars: ✭ 17 (-79.52%)
Mutual labels:  http-server
httpfs
Go 编写的静态文件服务器,支持文件拖拽上传,无第三方包依赖, 支持 Windows, Linux , Darwin。
Stars: ✭ 28 (-66.27%)
Mutual labels:  http-server

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.

Quick start

  1. Run make.
  2. Run ./server or ./server [port] (port = 8000 by default).
  3. Open http://localhost:8000/ or http://localhost:8000/test in browser to see request headers.

Testing and benchmarking

I suggest using Siege utility for testing and benchmarking the Pico HTTP server.

> siege -i -f urls.txt

Links

Reworked and refactored from https://gist.github.com/laobubu/d6d0e9beb934b60b2e552c2d03e1409e.

Based on http://blog.abhijeetr.com/2010/04/very-simple-http-server-writen-in-c.html.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].