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.
Martin, are there advantages using Devd over other portable http servers?
Depends on the other server programs and what you need them for. What I like about devd is that it is simple to use and supports additional functionality like simulating low bandwidth/high latency.
As an alternative: http://www.rejetto.com/hfs/
Great post, I’ve been recently trying to use a CC3100 to send data to a server and have been searching for generic light-weight TCP/UDP server to test with.
My favorite thus far has been SocketTest v3 (Akashathkumar Shetty), followed Hercules v3.2.8 (HW-Group), then HFS, then the rest (iptools-0.9.9, abwsx1, mongoose-free-5.6, nginx, TcpCatcher.jar, UltiDev Web Server, xampp, sami)
I think it is very useful! Specially in those resource limited scenarios and small applications that doesn’t require PHP.
I’m getting a copy!
Hmmm . . . would ask the same question because I use HFS for accessing files or serving them to others. Lightweight, portable, somewhat secure.
But, Devd–out of my league, I think.
Any security considerations and precautions
when using this server?
– Pale Moon 25.7.3 and FF 41
– Ubuntu Linux 12.04 (32-bit)
– Samsung Tablet Galaxy Tab3 / Android 4.2.2
I’m guessing it doesn’t support https.
Caddy’s even better
OS X users with homebrew can :
brew tap hrbrmstr/devd
brew cask install devd
First, there is TinyWeb: 59kb only, CGI supported; Also there’s SSL version, but I couldn’t find where to download it.
Second, there is MiniWeb, which is my choice for serving static files in office. Unlike other “developement” servers I tested, this one is exceptionally stable and has some unique features, like serving contents of 7z archive.
(though it also has some quirks, so check discussion at http://sourceforge.net/p/miniweb/discussion/319932/)