[Gambas-user] Embeded HTTP server

Benoît Minisini gambas at ...1...
Fri Sep 28 01:06:57 CEST 2012


Le 28/09/2012 00:54, Adrien Prokopowicz a écrit :
>
> Wow, that sounds great ! Thanks Benoît ! :-)
> I will try it out right now, and see what I can already do with that.
> Just one little question : as you say that the interpreter makes many
> initializations, is the project (and all its data, and maybe
> translation files) loaded as well ? This can affect a lot the execution
> time.

At the moment, the HTTP server is run just after the ".project" file has 
been loaded, analyzed, and the required components loaded. When it forks 
to actually run the project, the _init() functions of all exported 
classes from components written in Gambas are called, the main hooks are 
run, and then the Main() function of the startup class is run.

As for translation files, they are always loaded the later as possible 
(when the first translated string of the component or the project is 
needed).

>
> I will see if apache can redirect the HTTP request to the interpreter,
> so that Apache will handle serving static files (CSS/JS/Images ...) and
> rewrite some URLs. It could be a workaround until the gb.httpd server
> can handle all that.

gb.httpd is intended to serve only what is inside the project. I think 
it could be modified so that it serves static files located inside the 
project without running the CGI script.

Regards,

-- 
Benoît Minisini




More information about the User mailing list