You can still use CGI with Apache. Apache will execute your program on each request and return its output from stdout as webserver response. If you have a form, it’ll get POSTed to stdin when Apache execute your program. You can write your program with whatever language you want as long as you can read stdin and write to stdout. It’s just tedious af so no one really use it these days. PHP was basically born because people got tired writing CGI program with pearl or C and want something more convenient. But with modern programming languages, perhaps CGI is not too bad, except the one process per request which will absolutely kill your server the moment you have visitors spike.
Why not? Is it because a typical nodejs app include hundreds of npm dependencies? As long as it can launch and finish within 60s (default timeout for apache), you should be able to use it.
You can still use CGI with Apache. Apache will execute your program on each request and return its output from stdout as webserver response. If you have a form, it’ll get POSTed to stdin when Apache execute your program. You can write your program with whatever language you want as long as you can read stdin and write to stdout. It’s just tedious af so no one really use it these days. PHP was basically born because people got tired writing CGI program with pearl or C and want something more convenient. But with modern programming languages, perhaps CGI is not too bad, except the one process per request which will absolutely kill your server the moment you have visitors spike.
Removed by mod
Why not? Is it because a typical nodejs app include hundreds of npm dependencies? As long as it can launch and finish within 60s (default timeout for apache), you should be able to use it.
Removed by mod
Not saying you should use CGI (who does these days), but saying you could still use it if you want
Removed by mod