4 ms·
CGI is just running a program in response to a request. Things about the request are put into environment variables and POST/PUT bodies are on stdin. Your progr
by zrail 7y ago
CGI is just running a program in response to a request. Things about the request are put into environment variables and POST/PUT bodies are on stdin. Your program writes HTTP headers, two newlines, and the response body.
You don't need libraries. If you have reasonably low traffic CGI can get you really far.
- yjftsjthsd-h 7y ago> If you have reasonably low traffic CGI can get you really far. And even after that, I would expect that CGI augmented with some careful caching (read: all static content and some dynamic content with sensible expiration policies) will get you even farther without having to dramatically change anything.
- cutler 7y agoI built an app in Perl/CGI::Application for a company which ran media campaigns with national brands over a 12-year period. It's not the fastest option but it certainly works.
- jimbokun 7y agoThis would be a nifty exercise for a web programming class. Really internalize a lot about HTTP in a short amount of time.