is going to compile every time it runs, which makes the program unnecessarily slow, and if it's used heavily, will add quite a load to the server.

I finally done it, and I'm not sure if it compiles every time. It opens the page lightning fast since I use SSD drive. I'm not sure how to check if it compiles every time.

Right now, I'm logged in as root and chmoded recursively the whole /usr/lib/cgi-bin/ folder
and it succeed.


#!/usr/bin/env dub /+ dub.sdl:
   name "application"
   dependency "arsd-official:dom" version="4.0.2"
   subConfiguration "arsd-official:cgi" "cgi"
+/
import std.stdio;
import arsd.dom;
void main()
{
   writeln(`Content-type: text/html`);
   writeln(``);

auto document = new Document("<html><body><p>paragraph</p></body></html>");
   document.root.innerHTML = "<p>hey</p>";
   writeln(document);

// writeln(`<body style="background: lightgreen">CGI D Example</body>`);

}

Reply via email to