Forum > Networking and Web Programming

FPWebModule test on macOS

(1/2) > >>

hventura:
Good day to all.
I'm new to the forum and new to pascal and lazarus.
I'm currently on a Course of Programming and one of the classes is abaut Pascal and my teacher started using Lazarus.
We are making some web modules and in windows i can "run" the executable and access to 127.0.0.1 to show the onRequest response, or access 127.0.0.1/otherFunction to show "other pages".

At school i have access to a windows computer but at home i have a mac and i have lazarus instal. i followed the installation manual and i can program and run Applications.
But not the web modules.

My question is what do i have to do to test the web modules on a MacOS?
I have XAMPP installed, up and running.

Phil:

--- Quote from: hventura on April 18, 2018, 01:42:08 pm ---My question is what do i have to do to test the web modules on a MacOS?
I have XAMPP installed, up and running.

--- End quote ---

Apache comes preinstalled on Macs, so you shouldn't need to install XAMPP unless you need MySQL, etc.

I don't use FPWebModule, but CGI apps and Web apps in general are easy to create on Mac:

https://macpgmr.github.io

Local server testing can be done by putting binaries under /Library/WebServer/CGI-Executables and HTML docs under /Library/WebServer/Documents.

hventura:
Thank you, was very helpfull for future projects! i will read more about creating on XCode :)
PS: Yes i do have Xampp because of mySQL!

Still, i was wondering if it is possible to test (and how to) a FPWebModule on a MacOS. I need this because in school i code in Lazarus and test in on local computer (Windows) and at home, i would like to continue the working and test it on my MacOS.

In Windows i code the module, i compile it and creates an executable file, i execute it and it enables me to test all on http//localhost;
Is it possible in MacOS or what type of project do i have to create to simply code the module and test it on localhost?
 

Phil:

--- Quote from: hventura on April 18, 2018, 03:45:13 pm ---Is it possible in MacOS or what type of project do i have to create to simply code the module and test it on localhost?

--- End quote ---

Copy the source files for your project from Windows to Mac, then open the project info file (.lpi) in Lazarus on Mac and try compiling and running it.

hventura:
In the picture there are the results of when i compile in windows (and the file i run) and when i compile in Mac.
When i compile AND run the same thing in Mac it does nothing..

I first thought it could be because of some apache configs to accept web modules but i don't understand much to know if it has anything to do with it.
It seams so easy on windows that i think i is easy on Mac too... just need to figure it out.

I tried to start apache manually "sudo apachectl start" but all i get is the default "It Works"..
As i'm really new to this i might be crossing subjects and be confused by something, for that im sorry for anything. And thanks for the patience!
 

Navigation

[0] Message Index

[#] Next page

Go to full version