Skip to content

Instantly share code, notes, and snippets.

@Dialga
Dialga / ph7_server.c
Created January 12, 2015 15:02
Basic civetweb + PH7 web server
/*
* Extremely minimal civetweb(formerly mongoose) + PH7 scripted web server for embedded use,
* or just a lightweight alternative to your usual PHP and Apache, nginx, lighttpd.
* Serves up files and PH7 scripts from the directory run.
* Compiles on linux with:
* cc -Wall -pipe -DPH7_ENABLE_MATH_FUNC -O2 -lm -ldl -lpthread civetweb.c ph7.c ph7_server.c -o server
* Windows: untested
*/
#include <stdio.h>
#include <stdlib.h>