What kinds of Software do you create in D.

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Nov 2 16:48:21 UTC 2021


On Tue, Nov 02, 2021 at 01:40:46PM +0000, Adam D Ruppe via Digitalmars-d wrote:
> On Monday, 1 November 2021 at 23:49:35 UTC, H. S. Teoh wrote:
> > :-) Which is awesome 'cos it can be tested on command-line without
> > starting a webserver, *and* the same binary works inside CGI too.
> > cgi.d is total awesomeness.
> 
> And it has an embedded webserver if you do want one! can even serve on
> a unix domain socket though i've never found that terribly useful so
> far.

A CGI app listening on a unix socket could potentially be useful in
certain sandboxed webserver setups where the webserver talks to the CGI
executable running in the background via the unix socket.  I've actually
seen similar setups before (an external webserver linked to a
localhost-only webserver running in a separate process), though these
days this approach is kinda obsolete.  But I could see some niche use
case where the CGI program is actually a daemon that's doing other
things in the background, and occasionally services a request from the
web-facing webserver via CGI.  A unix socket would be just the thing for
something like that.  (Though equally common, if not more, these days is
to just listen to a TCP socket bound to localhost.)


T

-- 
The peace of mind---from knowing that viruses which exploit Microsoft system vulnerabilities cannot touch Linux---is priceless. -- Frustrated system administrator.


More information about the Digitalmars-d mailing list