smari / Cavy

A simple web server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cavy

A toy HTTP daemon written in Jai. It's a bit like a member of the Caviidae family.

I highly recommend against using this web server in reality. Use something like nginx instead. I wrote this server in order to experiment with Jai and refresh some skills. It's not intended as more than a plaything.

Building and running

Depends on my Socket and Datetime libaries being in lib/

Run:

$ jai build.jai

The executable is cavy. Enjoy!

Features

  • Basic HTTP/1.0 and HTTP/1.1 requests
  • Autoindexing
  • Nginx-style config files
  • HTTPS
  • Multithreading (per server coordinators and a threadpool)

TODO

  • Check for memory leaks
  • Fix SIGINT handler so it actually exits
  • Support more configuration/generalize config parser
  • Support location directives
  • Customizable error pages
  • Customizable index pages

About

A simple web server