macSVG Banner Image

Rapid Testing With Built-in HTTP Server

macSVG includes a built-in HTTP server, which allows a document to be quickly previewed with standard Mac web browsers like Safari, Chrome and Firefox, and other devices on the local area network, including iOS devices, PCs, etc.

By default, the HTTP server is not enabled.  To enable or disable the HTTP server, choose the Preferences… command under macSVG menu, and set the checkbox labeled “Enable HTTP Server” accordingly.  The port number for the HTTP server can also be set in macSVG Preferences.  The default port number is 8080.

macsvg_preferences_window

When the HTTP server is activated for the first time, macOS will request permission for the application to accept incoming network connections –

accept-connections

Click “Allow” to enable macSVG’s built-in HTTP server to receive connections, or “Deny” to to block incoming network connection requests.

The easiest way to test the HTTP server is to click on the button in the SVG tools palette labeled with the URL of the server –

tool_palette_and_controls

In this case, the button is labeled “https://192.168.10.8:8080”.  In most cases, a different URL will be displayed on your Mac.

Clicking on that button will launch the default web browser on your Mac, such as Safari, and navigate the browser to the specified URL.

It is also possible to manually enter the URL into other web browsers on your Mac.

The Xcode iOS Simulator app can also connect to the macSVG HTTP server.  Launch a web browser like Safari Mobile, and enter the URL as usual.

Other devices on your local area network can also connect to the macSVG HTTP server, so it is easy to get an instant view of an open macSVG document on external hardware like iPhones, iPads, Android devices, other Macs, Windows PCs, etc.

Another way to test macSVG designs for Android browsers is to install the “Andy” emulator on the Mac.  It will emulate an Android device, and web browsers like Google Chrome and Firefox for Android can be installed for testing purposes.  The Andy simulator is available as a free download at https://andyroid.net.


Previous page: Animation and Special Effects

Next page: Using macSVG with other software

Full index: macSVG User Guide