I found a sample program of a simple multithreaded httpserver (fbchttpd) written in freebasic in the following link:
freebasic-world.narod.ru/simplewebserver.html
It can be compiled and packaged as an executable (exe/dmg/deb/rpm/tbz2) and installed in the respective os, after which it can be run and used either as standalone server or as a proxy server behind apache2 using combination of modproxy and modrewrite modules. Then there is support for httpheader module, which also has to be used in any case such as the examples above, but I couldn’t find any examples using the gcc’s curl library module (as per the freebasic documents, anything available in gcc should be available in freebasic unless the gcc-stack integration is not fully complete and as per freebasic documents it is very much available and usable but there is no example of curl usage provided unlike scriptbasic). An example of using cgi html template, http header and curl should make understanding things more simple, and make freebasic more powerful.
This (fbchttpd) reminded me of the eszter engine (sbhttpd) of scriptbasic which can be used for heavy duty web applications, so I thought this (or similar module) should have already been included as an additional library or module (fbchttpd), and maybe borrow the feature of “”" “”" (triple quotes) and var and __var all of python and $ (dollar) and @ variables both of perl and #{ } of ruby to make web applications more easier into freebasic just the same way as scriptbasic has already implemented. Since freebasic is more oops oriented (like c++ and ruby) than scriptbasic, it can also import some ruby features such as (<<, <==>, =~, etc) to make web applications more easier (although in case of scriptbasic, if we include the ‘t module’, we can already use oops in scriptbasic and writing of web applications look easier, but freebasic’s feature of usage of replacing of goto with oop function call alternative makes it look more elegant).
This way we can improve the server side web pages using options other than the simple cgi module of webservers, considering the fact that modbasic (modfreebasic and modscriptbasic) should not give them any speed advantage over modcgi (since basic dialects always run commands line by line rather than programs or blocks, which means even the web modules has to execute commands line by line thereby slowing down the process).
Then there also needs to be support for inclusion (addition) of the json module (javascript server object notation) into freebasic, so as to acquire its ability to run client side freebasic web programs exchanging data from server side freebasic cgi web programs, or at least an interaction between freebasic-json-client programs with embedded scriptbasic-sbhttpd-cgi-server programs (as currently freebasic and scriptbasic both lead the traditional basic and using both together covers all the possible requirements for any task, or rather some kind of hybrid of both these dialects looks even better, hope to come across something like that in obasic (openbasic)). Also, we need also to add the support for memcache module to speeden up the freebasic based web programs.
So far the support for json and memcache module are missing even in scriptbasic (but there is a non-json alternative support for javascript, such as by using a combination of dom’s mydiv, html_forms_element’s myselect and XmlHttpRequest’s ajax.request, only creating and grouping together these and similar functions, soap, rest and others under json remains), and as such the web toolbox options are incomplete without these.
Also, once when the simplehttpserver module (fbchttpd) gets included into freebasic, eventually the application server framework similar to ruby-on-rails, and eventually also a content-management-framework should be targeted next for all basic dialects, whether freebasic or scriptbasic. If fbchttpd runs then at least one can hope for at least one of the two, i.e. to use freebasic-fbchttpd-cgi-server programs with scriptbasic-json-client programs (once again embedded into freebasic) at the moment.
Without features such as json, memcache, “”" “”", $, #{ }, =~, etc would mean using freebasic almost as an almost boilerplate template or a local gui container interface (except for the curl module and the simplewebserver) somewhat relying on embedded scriptbasic code to do some critical web related tasks, because in real scenarios even databases forbid direct access to clients without channeling via webserver or framework so its existing set of tools cannot be made use of unless and until those features are available. Or at least if FBIde and FBEdit also offer to add scriptbasic compiler directory, and callback toolkit for guiding of scriptbasic embedding into freebasic. In contrast to this in case of scriptbasic there is only one major thing missing – i.e. the scriptbasic ide itself (otherwise everything appears to be possible with scriptbasic), and plus the further development of the ‘t module’ (oop) with more inbuilt functions and subroutines to make it look as elegant as freebasic code, developing a more elegant alternative to the use of goto (e.g. for exception and error handling), etc.