Devd is a lightweight HTTP server
Devd is a lightweight cross-platform HTTP server for Windows, Linux and Mac OS X that provides impressive functionality in a single executable file.
The application has no dependencies and you may run it from any location you drop it in. The program needs to be run from the command line as there is no interface to play around with.
Devd makes up for it by making it simple and straightforward to start a HTTP server on supported systems.
The command devd ./ -ol for instance starts the server in the root directory of the drive the program is executed on, opens a browser that displays the contents and reloads automatically when files change in the source directory.
A log is not kept but information are echoed on the command prompt so that you know what is going on this way. Logs are colorized for quick evaluation and may spawn multiple lines to make this even easier.
The list of commands is extensive, here are a couple of examples:
- -H adds header information to the log the program echoes in the command prompt window.
- -A provides you with options to specify an address to listen on.
- -d lets you throttle the downstream to the client to a specific Kilobyte count.
- -u throttle the upstream.
- -n adds latency milliseconds.
- -p specify another port to listen on. If no port is specified, devd will auto-pick a port.
As you can see, there is more to the application than running a HTTP server on a computer system. You may use devd for instance to simulate a slow Internet connection or high latency to make sure your web application is up for the task.
Devd can be used as a reverse proxy, or light-weight virtual host. The command devd ./st api=http://localhost:8888 for instance serves a static site from devd.io (which resolves to 127.0.0.1) and reverse proxies a local app on api.devd.io.
You may also use the -x flag to exclude flies from the program's live-reload functionality.
A good starting point to get acquainted with devd is the project's Github page. There you find the source code, downloads, and information on several of the parameters and commands the program supports.
I like portable lightweight applications and devd fits that description perfectly. To make things easier, you could write small batch scripts to automate the process of starting the server on your system so that you don't have to write long commands each time you need to do so.Advertisement