Desktop app and web server app

Is it possible in Xojo to create a Raspberry Pi desktop app that is also a web server?

I know I could create a desktop app and then write my own web server within but was wondering if there was a way to do this out of the box.

I once wrote a desktop app that held a Web app within itself. It used Shell commands to start/stop it and get any messages. It worked OK, but I’m not sure if it would pass the AppStore tests these days.

I did it once, using two apps - one desktop and one webapp-server:

  1. create one SQLite database, to be opened by BOTH apps; it will serve as “data bridge”
  2. Create regular desktop app, using above mentioned SQLite database to exchange information with web app server application
  3. in web app server application do a connection to the same SQLite database, on app. part
  4. add a Timer in app. part of web app server application, which will pool SQLite database to see, if there are any “commands” from regular desktop app and give feedback etc.

This way I created solution, where running web app server application has graphical front-end for administration in form of regular desktop app. Working on Pi.

Isnt this exactly what Aloe Express could achieve for you ?

It is posible but it is NOT a good ide. The xojo is single threaded. Handling the UI and all the sockets for a web serveris too much for it. Better to have separated apps for the Desktop and Server.