File Server

File Server is a static file web server, similar to Apache, Nginx, and Mongoose. It aims to be smaller, more performant, and easier to use than the other servers. It also includes functionality for minifying/inlining/pretty-printing several web formats.

Click here to download the zip file containing binaries for the following platforms:

Example 1: Serve current folder on port 8000

fs 8000

Then visit http://localhost:8000 in your browser.

Example 2: Require login with username "aaron" with password "iscool"

fs 8000 -a "aaron:iscool"

Example 3: Mask autoindex with "index.html" and move autoindex to prefix "/admin/"

fs 8000 -a "aaron:iscool" -p admin

Usage

USAGE:
	fs [port] -local -a [username:password] -p [prefix]
WHERE:
	-[port] is the port
	-if -local is set, server only listens on localhost rather than on all adapters
	-if -a is set, [username:password] are the credentials for basic authentication
	-if -p is set, [prefix] is a path prefix that requires authentication, shows the
	 autoindex, and allows uploads; non-prefixed paths no longer require authentication
	 (if set) and the autoindex is masked by a file named "index.html", or 404 if
	 such a file does not exist
EXTRAS:
	fs ip => print local IPv4 addresses
	fs minify [css|js|json] => minify a .css or .js file
	fs inline [html] => inline a .html file that contains external css or js
	fs render [html] => render a .html file that contains server-side includes
	fs pretty [json] => pretty-print a .json file

What features does this server support?

How is this better than Apache/Nginx/Mongoose?