Mongoose – Simple web server

Thanks my friend Mart who introduces reveal.js to me. It’s a great presentation framework and we used it for our Front End Web Development course in General Assembly.

Without the web development framework like Python Django or Ruby on Rails which bundle with pserver and WEBrick, i would like to find a light weight web server such that i could edit and preview my markdown which runs on reveal.js. Finally i find Mongoose.

As stated on their project website. Mongoose provides simple, functional, embeddable web server to make it easy for application and device developers to implement web interface for their application and devices, and to offer a simple web development environment. Here is the overview about Mongoose.

  • Liberal, commercial-friendly MIT license
  • Works on Windows, Mac, UNIX, iPhone, Android, and many other platforms
  • Support for CGI, SSL, SSI, Digest (MD5) authorization, Websocket, WEbDAV
  • Lua server pages (PHP-like functionality using Lua) with SQLite3, see page.lp
  • Resumed download, URL rewrite, IP-based ACL, Windows service
  • Excluding files from serving by URI pattern (file blacklist)
  • Download speed limit based on client subnet or URI pattern
  • Small footprint: Mongoose executable size is 64 kB on Linux 2.6 i386 system
  • 320 kilobytes Windows executable with all of the above (including SSL, Lua, Sqlite) and no dependencies
  • Simple and clean embedding API, mongoose.h. The source is in single mongoose.c file to make things easy.
  • HTTP client functionality for embedded usage, capable of sending arbitrary HTTP/HTTPS requests
  • Embedding examples: hello.c, post.c, upload.c, websocket.c
  • User Manual

Download the mongoose.exe and run it on the webroot. You can configure it by right clicking the Mongoose icon on the system tray.

The default url is http://localhost:8080.

Done =)



2 thoughts on “Mongoose – Simple web server”

    1. haha~ i haven’t done any benchmark on that. just wanna setup a dev environment on my windows machine so i dun really care about the performance. i think Nginx serve pretty well as proxy. it can do a lot of caching for static page. so you can consider using nginx as the first door to receive requests and pass to apache if caching couldn’t serve the request.

      And i also find a blog post saying mongoose is not very good for high loading since it has many compromises on code for windows platform.

      There are many lightweight webserver and probably nginx is the most common one right now.
      Wikipedia – Comparison of lightweight web servers


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.