How to setup D language with Apache httpd cgi?
BoQsc
vaidas.boqsc at gmail.com
Wed Jul 31 07:42:22 UTC 2019
> This seems to work well when running not from cgi, so there is
That was not true, it didn't work even from Linux Shell, I
corrected shebang, now it works from Linux Shell.
An, unexpected thing: It did require permissions: sudo
./example.d which was not the case with rdmd.
cgi still shows Internal Server Error.
Maybe cgi cannot run this script due to lacking sudo permissions
required by dub? Unsure.
>#!/usr/bin/env -S dub run --single
>/+ dub.sdl:
> name "hello"
> dependency "arsd-official" version="~>4.0.1"
>
>+/
>import std.stdio;
>void main()
>{
> writeln(`Content-type: text/html`);
> writeln(``);
> writeln(`<body style="background: lightgreen">CGI D
> Example</body>`);
>
>}
More information about the Digitalmars-d-learn
mailing list