The web component gb.web allows you to develop a web application based on a CGI script using the following classes:
They primarily use
To develop and test CGI web applications with the gb.web component, you need an HTTP server on your system, because web applications run on an HTTP server!
The development of web applications with the components gb.web or also gb.web.gui only really makes sense if, on the system
so that you can actively work with Gambas generated web pages or the Gambas CGI scripts in the form of WebPages!
The Gambas Wiki and the Gambas Bugtracker are such web applications that are written in Gambas and run on a server that meets the above conditions. For most users, therefore, the only option is to test and run the developed web applications on a local server.
Notes:
Initial situation:
(a) Change to the project folder of the WebPage:
hans@mint20:~/Schreibtisch$ cd wpi hans@mint20:~/Schreibtisch/wpi$ GB_HTTPD_PORT=8080 gbx3
Result: Output of the HTML source code in the console.
(b) Change to the project folder of the WebPage and activate the embedded web server:
hans@mint20:~/Schreibtisch/wpi$ GB_HTTPD_PORT=8080 gbx3 --httpd ' Alternative -H
This is the output in the console:
gb.httpd: bind 0.0.0.0 - Address already in use.
After calling it in the author's browser with http://localhost:8080 or localhost:8080 or 127.0.0.1:8080 or, for example, with http://192.168.2.106:8080, you will see the web page display in full epic width. You can cancel the interpreter with CTRL+C.
After copying the executable file wpi.gambas and the required files css/style.css and images/favicon.png into the web directory ~/public_html, the web page is displayed via the local web server Lighttpd with:
http://localhost/~hans/cgi-bin/wpi.gambas
You can use the three domains example.com or example.org or example.net as sample domain names in your examples (→ RFC 2606). Only these three reserved domains currently administered by the Internet Assigned Numbers Authority (IANA) can be used in your samples without any problems. You can find details on this topic on Daniel Rehbein's website at http://www.daniel-rehbein.de/rfc2606.html (→ as of 23.11.2020).