mORMot1 (2) Acting like CGI lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- BSaidus · 2025-10-30 08:18 Hello. Are there any peoples or @abouchez who can help (expliaine) me, giving exemple or enlightements about my requests.   - Is mORMot capable to act as a .cgi program ? Giving a desktop application written with lazarus/fpc which interact with some http server supporting cgi (Apache, ...) using mORMot:   I work with data (from Db) in my desktop application, then while saving, the data will be posted to remote server (Apache) that executes the ".CGI application,   the ".CGI" program will intercept tha data sent by me and save them to ".DB". After saving I need to do some calculus (works) depending on this data.     The classcal CGI is working well, But I wonder if mORMOT is capable of that. (I know that mORMot RemoteDB is working well, But IT IS NOT CAPABLE to DO WORKS AFTER SAVING DATA) ---------------------------------------------------------------------- Thaddy · 2025-10-30 09:02 Any command line program using write/writeln for output can run as a cgi, so mORMot1 and 2 too. Running it as cgi is somewhat out of the box, but of course you probably need some formatting work and input field streams. A cgi is basically nothing more than a command line program:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i begin  writeln('Hello, world');end. is a cgi if you put it - compiled - in the cgi directory and change the extension to cgi. You just need to pay some attention if you need user input. ---------------------------------------------------------------------- BSaidus · 2025-10-30 09:09 Quote from: Thaddy on October 30, 2025, 10:02:44 amAny command line program using write/writeln for output can run as a cgi, so mORMot1 and 2 too. Running it as cgi is somewhat out of the box, but of course you probably need some formatting work and input field streams. A cgi is basically nothing more than a command line program:Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i begin  writeln('Hello, world');end. is a cgi if you put it in the cgi directory and change the extension to cgi. You just need to pay some attention if you need user input. I understand that, but what if there is a possibility for mORMOt RemoteDB to fire events after receiving, sending data for exemple? ---------------------------------------------------------------------- Thaddy · 2025-10-30 09:15 Yes, because that has nothing to do with the Input/Output logic. It is as in every other program provided your cgi has a messageloop for the events. (no events without messageloop)