[Gambas-user] WebPage and external files
bsteers4 at gmail.com
Sun Nov 13 16:23:26 CET 2022
On Sun, 13 Nov 2022 at 13:16, Hans Lehmann <hans at gambas-buch.de> wrote:
> For the Gambas book on gambas-buch.de I would like to provide some
> simple web projects based on the class `WebPage`.
> For this I want to use the internal HTTP server - either in the IDE or
> in the console (**) with
> Console: hans at pc-mint20:~/CGI/wp_example1$ GB_HTTPD_PORT=8080 gbx3 -H
> URL: http://localhost:8080/
> Reason: Not everyone wants to install and configure an HTTP server like
> Lighttpd or Apache2 for first tests.
> For CSS I use Inline-CSS and for JavaSript Inline-JS, but this makes the
> source code difficult to read.
So don't then ;)
However, I am unable to integrate multimedia objects such as images,
> favicons, audio files or video files.
> When using the internal HTTP server in the IDE or via the console as in
> (**), is it possible to include the content of external files (CSS,
> this can be realised.
> With kind regards
How exactly do you mean "external" ?
Files on your computer that are not part of the project or URLs?
I would say only if they are online.
(I do no know this for concrete fact, but this is as i understand things)
You should be able to use online URLs,
URLs of online resources should be reachable (if the computer is online)
but not anything on your local machine external to your project as the
server will not be configured to see your computers files in any way except
for the currently running project files.
Running the internal server is like letting gambas do the "install and
configure" a server for you and It does nothing at all fancy in any way.
it's a minimum requirement server to run the current project only.
I find using the .public folder is a good place to put things your project
will be able to see.
Pretty sure gambas internal server can use the .public folder.
For your examples for your book entries you should try to use online URLs
to the resources or provide them with the source project.
I think ultimately if you are going to write web projects then configuring
apache or lighttpd is a bridge you must cross pretty early on.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User