Technical Note: Using Aloe Express in Xojo Web Projects

Due to the unique way that Web applications are opened and monitored on Xojo Cloud, you might experience performance issues when using this technique with Xojo Cloud.

While Aloe Express was originally designed for use in Xojo console projects, it can also be used in Xojo Web projects.

To get started, create a new Xojo Web project. Then add the Aloe Express module into it.

Configure the App.Open Event Handler

Add an Open event handler to your app. In it, create an instance of the AloeExpress Server class, and then call the Start method. For example...

Add an App.RequestHandler Method

Next, add a method named RequestHandler to the app. This is the method that the server will hand requests off to. Be sure to add a Request (AloeExpress.Request) property to the method. For example...

Run the App

Next, run the app, and then in your browser, send a request to You should see a "Hello, world!" response.

How - And Why - This Works

By creating an instance of the Aloe Express server in the app's Open event handler, we're essentially replacing the framework's standard server. When the Aloe Express server is run, one of the last things that it does is perform an endless loop in which it calls App.DoEvents. This prevents the framework's standard server from ever starting up.

Next Steps

That's all there is to using Aloe Express in Xojo Web apps. To learn more about Aloe Express, check out Getting Started With Aloe Express.

© Copyright 2019 Tim Dietrich. Made with Xojo 2018r4 & Aloe Express 4.1.0.