Hosting ESP in Appweb

ESP applications can run stand-alone via the esp utility command. Alternatively, they can be hosted in the Appweb web server as part of a broader set of web services and content.

ESP is included by default in Appweb. However, Appweb can be configured and built to exclude ESP. If you have trouble activating ESP in Appweb, ensure it was included in your build of Appweb.

ESP Applications

ESP applications hosted in Appweb are still are configured via their esp.json file. However, Appweb manages the listening endpoints, user accounts, logging and properties defined in the http.server collection of the esp.json file.

For more information, please read Configuring ESP and the relevant sections of the Appweb Configuration Guide before reading this document.

Defining ESP Applications

To define an ESP application in Appweb, use the EspApp directive in your appweb.conf file. This directive takes the following arguments:

EspApp prefix="URI" config="path/to/esp.json"

Compiling

When compiling ESP applications to be hosted in Appweb, you must use the appweb-esp command instead of esp. This is because you must link with the Appweb libraries when compiling ESP applications.

© Embedthis Software. All rights reserved.