[Lazarus] Developing with fcl-web

Reimar Grabowski reimgrab at web.de
Sat Jul 26 20:48:51 CEST 2014


On Sat, 26 Jul 2014 10:56:33 -0700 (PDT)
leledumbo <leledumbo_cool at yahoo.co.id> wrote:

> > My major problem with Lazarus is where is my server? 
> > So how do I configure Lazarus to do about the same? 
> 
> fphttpserver (embedded), the choice is yours. The last is capable of debugging from IDE.
> If you use the Lazarus wizard, you should've found it in the application
> type selection dialog. But actually they only differ in uses clause (fpcgi,
> fpfcgi, fphttpapp), everything else is the same.

So now we are getting somewhere. The embedded server is embedded inside the application and not inside lazarus, good to know.
I already found something that looked to be usefull 'HTTP server Application' but I was not sure about the relations to '(Fast)CGI Application' and what I had to do to transfer one into the other.
If it's really just changing the uses clause it would be easy enough.
I tried this on my older CGI Application, changing the uses clause in the .lpr file to 'fphttpapp'. Compiled without a problem but of course I could not run it in Lazarus since the run button/menu entry is disabled.
Running on the command line gave a socket error which looks like it is working (perhaps changing the port from 80 to something else fixes this).

To recap:
1. I start with a 'HTTP Server Application' to enable my run button/entry since the other two CGI/FCGI disable it.
2. Do my coding/debugging as usual all inside Lazarus.
3. For deployment I change the project to a FCGI one by just replacing the mentioned unit and compiling it.
4. The resulting executable can be put on my Apache on my VM.
5. I am happy.
6. ???
7. Profit

If it's that simple why is it that hard to get that information. Please, tell me I am stupid and there is a wiki page that I just did not find.

Thanks alot.
R.
 




More information about the Lazarus mailing list