Re: [dev] [quark] Integrating form handlers with quark

From: Teodoro Santoni <asbrasbra_AT_gmail.com>
Date: Wed, 9 Feb 2022 11:37:37 +0100

Hi

2022-02-09 11:28 GMT+01:00, climbTheStairs <yxtqwf_AT_gmail.com>:
> Hello,
>
> I have used quark to host my static website for the past few months,
> and I've been amazed by how well it works.
> I want to try out the idea of keeping data processing
> and data presentation separate, described on quark's webpage:
>
>> The solution is to rely on static regeneration independent
>> from the web server, which just serves static files.
>> You can still implement e.g. form handlers for dynamic content
>> which run as their own network instance
>> and operate independently from the web server.
>
> However, I'm not quite sure how this would be done?
> I'm writing a simple Go program to handle forms
> (and only handle forms) on my website,
> but I do not know how I could integrate that with quark.
>
> I obviously can't have two different programs
> both listening simultaneously on the same port (80);
> unless I were to use multiple domains and servers,
> would I need a reverse proxy like Nginx to pass
> POST requests to the form handler and GET requests to quark?
> That seems like it would completely reverse
> the simplicity that comes with using quark.
> Or would I need to install the basecgi patch
> to pass the form to the external handler program?
>
> Or is there something I'm completely missing?
>

A reverse proxy is vital only if your server can serve only HTTP(S)
and little else. Otherwise it just prevents urls from looking ugly:
you can serve your other process for input process on another port and
put http://your.url:12345 in the form's action attribute.
Received on Wed Feb 09 2022 - 11:37:37 CET

This archive was generated by hypermail 2.3.0 : Wed Feb 09 2022 - 15:48:09 CET