4 ms·
> If only for the fact that both Python and Ruby come with decent, built-in webservers. With PHP 5.4+: `php -S 0.0.0.0:8000`, just as useful as SimpleHTTPServe
by spmurrayzzz 13y ago
> If only for the fact that both Python and Ruby come with decent, built-in webservers.
With PHP 5.4+: `php -S 0.0.0.0:8000`, just as useful as SimpleHTTPServer.
And I wasn't aware of Ruby coming with a web server. I know of WEBrick for Rails -- but is there a standard module that Ruby ships with that's similar to the above PHP and Python servers?
- berkes 13y agoWebrick comes in the <a href="http://www.ruby-doc.org/stdlib-2.0.0/libdoc/webrick/rdoc/index.html">Std-lib</a> http://www.ruby-doc.org/stdlib-2.0.0/libdoc/webrick/rdoc/ind.... I explicitely mentioned that the latest release of PHP comes with the built-in -S server. But that before this, it was always either install *AMP of some variation, which is, frankly a lot harder. And even now, Whereas Rails requires a few commanline commands, a CMS like Drupal still needs quite some fiddling to get it ro run on your localhost. (Source: I have been professional Drupal trainer for years) But let me note that neither three of these servers are anything good for production. But, for small (internal) projects, `SimpleHTTPServer`, `Webrick` or even `php -S` might suffice, especially when behind a reverse proxy. Yet of all three, Webrick is especially slow, and php-s is especially memory-leaking and unstable.