MacHTTP FAQ

Frequently Asked Questions about MacHTTP and MacHTTP-js


 

What is MacHTTP-js?

MacHTTP-js is a modern take on a stand-alone, desktop computer Web server, plus a whole lot more. It is derived from the ideas that created the original Mac Web server, MacHTTP. But it is implemented with modern technologies like node.js and is designed to run on lots of different operating systems and computers, from Macs running macOS to embedded devices like Raspberry Pis or container based systems like Docker. The desktop versions of MacHTTP-js are based on technologies like node.js, Express.js, and Electron.

Why is this a “preview” release?

MacHTTP-js is being released first as a Mac application. While it currently supports other operating systems and computer platforms, those packages aren’t quite ready. So rather than make Mac users wait, it’s being made available in “preview” form for macOS. It’s fully functional and has all of the features as the versions for other operating systems. But it needs more documentation, better examples, and the source code repository needs to be opened to the public. So, it’s a “preview” until then.

Why did you create MacHTTP-js in the first place?

The original MacHTTP application was created in 1992. 2017 will be its 25th anniversary. It seemed like a fitting way to celebrate the impact MacHTTP had on the Mac platform by releasing an updated incarnation for a new generation of Mac desktop users.

In the intervening years, the tools and techniques needed to get started with developing Web applications have actually regressed and are much more complicated than the average desktop user wants or needs to be involved with. MacHTTP-js eliminates the need to understand arcane command line tools or to be an expert in deploying Linux-based servers, etc. Instead, it returns to its roots as a double-clickable application with a friendly user interface that can help anyone who can operate a text editor to create compelling Web applications on their desktop that can also be migrated to public servers.

Why should I use it instead of [Apache/nginx/Express/etc.]?

Apache and nginx are examples of traditional command line-based servers that run as “daemons” on Linux, Unix, or macOS platforms. They are usually configured by editing text files and are quite cryptic to set up and operate. From a performance standpoint, one of the highest performing Web server platforms is Express.js running on a modern node.js runtime. This is exactly what powers MacHTTP-js under the hood. However, MacHTTP-js adds a user-friendly user interface and an extremely large number of rich, powerful extensions to the Express.js framework that make it possible to create compelling Web-enabled applications that act like native desktop apps. The short answer is that it is a LOT easier to use MacHTTP-js to create a web site, or develop a web application. And everything you do is portable to any server platform if you choose to deploy to a wider audience. So the question might be “why should I suffer with Apache or nginx when MacHTTP-js is available?” The answer is you shouldn’t.

What kind of amazing things can I do with it?

MacHTTP-js comes out of the box, ready to run any existing file-based Web site. It also provides the ability to execute server-side Javascripts embedded in your HTML pages. MacHTTP-js also exposes about 50 extensions to the built-in Javascript language (powered by the V8 Javascript engine) that make it incredibly easy to access local files and devices, to create native windows and user interfaces, and to communicate with other MacHTTP-js systems using powerful public key cryptography functions. MacHTTP-js makes it easy to communicate with IoT (Internet of Things) devices like Arduinos or Raspberry Pis via the serial port or any network connection. By running as a native application on desktops, it can also be used to replace shell scripts, AppleScripts, and batch files with a polished, interactive user experience.

What is included in MacHTTP-js?

Out of the box, MacHTTP-js includes the ability to create web sites powered by embedded Javascripts. MacHTTP-js is a full-featured web server in its own right. It also includes a built-in document tree that can serve current versions of Bootstrap.js, react.js, FontAwesome, Ace editor, jQuery, and associated styles for applications that need to operate off-line or disconnected from the Internet.

MacHTTP also includes about 50 additional scripting functions that provide the ability to read/write files in the local file system, communicate via the serial port, access native UI windows, interact with the local browser, provide public key crypto services, run scripts, and access a high performance in-memory database for saving and loading information about MacHTTP-js or your own Web applications.

MacHTTP-js also exposes all of the rich functionality of the Express.js web server framework to your Javascript applications, allowing you to easily define new routes and behaviors for your own applications without having to understand all of the intricacies of the Express framework.

Is it secure?

MacHTTP-js has full support for realm-based username/password authentication. This means that you can set up folders or portions of your document tree with different access rights, based on individual users and passwords. If you are familiar with security realms from the original MacHTTP, this is a very similar function.

As with any web server, it is only as secure as the platform it is running on. It also does not have direct support for certificate-based security via SSL/TLS. Future versions will have a friendly user interface for creating self-signed certificates, but for now, secure info should be encrypted and transferred using the built in public key crypto functions.

Why can’t I download it from the Mac App Store?

Because MacHTTP-js is so tightly integrated with the native operating system in order to access files, permissions, devices, etc., it is not possible to “sandbox” the application and still retain any meaningful utility. Since sandboxing is mandatory for Mac App Store submissions, it’s fairly certain that MacHTTP-js will always be distributed freely over the Internet rather than being restricted by Apple’s App Store rules.

What do I need to run MacHTTP-js?

MacHTTP-js is completely self-contained and has within itself all of the data and packages necessary to run on any of these platforms. All you need to do is double-click!

What platforms does it support?

The “preview” version of MacHTTP-js will run on any version of macOS that is actively supported by Apple. MacHTTP-js also runs equally well in interactive mode on Windows 10, various flavors of Linux (Ubuntu, Debian, RHEL, etc.), and even Raspberry Pis running Raspbian. It will also run in “headless” mode (no GUI) on macOS, Linux, and Raspbian, and also inside of Docker containers. These other versions will be released as part of the “final” release of MacHTTP-js in the near future.

Where are the developer docs?

The documentation for MacHTTP-js can be found in the app’s “Help” menu. Additional documentation can be found in the various repositories under the MacHTTP.Org GitHub site at https://github.com/machttp?tab=repositories

Documentation on the Javascript extensions supported by MacHTTP-js for server-side Javascript can be found in the internal document tree by accessing the URL:

http://localhost:3000/_static/docs/

 

Where is the source code?

Because MacHTTP-js is still under development, the source code still needs a little work to knock off some of the rough edges on the other non-Mac platforms. Once that is done, MacHTTP.Org will be hosting MacHTTP-js as an open source project (CC, Apache, or MIT license, TBD) that the community is welcome to contribute to.

What is MacHTTP.Org?

MacHTTP.Org was created in 2002 to provide a home for the original MacHTTP product, its open source code, and related tools and samples. It’s technically a DBA for Concluent Systems, LLC but it is fundamentally an umbrella organization to host community development activities around MacHTTP products.

What is Concluent Systems?

Concluent Systems is a Virginia LLC that holds the Apple Developer account used by Chuck Shotton to create MacHTTP-js. It’s a real company with one or sometimes two “employees,” but it is really dedicated to providing some legal structure to projects like MacHTTP-js in case anyone asks.

Who is this Chuck Shotton guy?

Chuck is a serial entrepreneur who has been the CEO or CTO of numerous start-ups. While helping to create and run the Office of Academic Computing for the University of Texas in Houston, he came up with what turned out to be the first commercially available Web server. Starting with MacHTTP’s creation in 1992 as a product of BIAP Systems, Inc., the product ultimately turned into WebSTAR, which was StarNine Technology’s flagship product that powered Apple’s Internet Server Solution for many years. After several leading start-ups, a detour into the venture capital world, a stint as chief architect on a big DARPA unmanned aircraft program, and jog through Wall St., Chuck finds himself back in the commercial software business, creating cool software technologies for large and small companies and making things like MacHTTP-js in his spare time.

Where can I get more information?

You can find more info on the MacHTTP.Org web site (http://www.machttp.org) or via email to info@machttp.org