PDA

View Full Version : Create a thinbasic webserver?



mar
09-05-2022, 03:26
Is it possible to setup a webserver in Thinbasic?

for example, python it has integrated a webserver
https://pythonbasics.org/webserver/

then, the info can be displayed via browsers.

can thinbasic be used as a http, webserver?

:)

Petr Schreiber
15-05-2022, 09:22
Hi Mar,

thank you for your question.

I would say the best way to create HTTP server in Python is currently FastAPI:
https://fastapi.tiangolo.com/

Regarding thinBASIC and this task...:
- you can use REST API server via CURL module
- you can perform simple GET requests via INET_UrlGetString
- you can use thinBASIC for server side CGI scripting

...but I would not recommend it at the moment for designing a HTTP web server.


Petr

mar
18-05-2022, 01:47
Hi Petr,

thank you for your information and tips about fastapi and thinbasic options and modules and commands.
I started to learn about it...


On the other hand, I read that you connected thinbasic to rust time ago.

I have a question about rust/thinbasic...

if the webserver were rust...is it possible to set in a rust route to go to thinbasic, then use thinbasic/oxygen(for all the programming), and then return the data to rust routes/html?

in order to have the programming done in thinbasic/oxygenbasic, and the output/input via rust http server

what do you think?

Petr Schreiber
20-05-2022, 20:25
Hi Mar,

while a bit unusual approach, definitely technically possible :)


Petr

mar
02-06-2022, 16:27
hi Petr,

thank you :cool: