3 ms·
How about: apt-get install php5 apache echo "<html><body>Hello World</body></html>" > /var/www/index.php The end.
by troels 12y ago
How about:
apt-get install php5 apache
echo "<html><body>Hello World</body></html>" > /var/www/index.php
The end.
- oblio 12y agoAnd are you going to use this process for development work? I doubt that. Plus, in your example, at the end you're stuck with PHP. I'd rather be stuck with Java EE :)
- zeograd 12y agolet's go simpler (and imagine logic coded in vanilla js if this project ever goes bigger :) : apt-get install apache echo "<html><body>Hello World</body></html>" > /var/www/index.html
- bebna 12y agoapt-get install php5 echo "<html><body>Hello World</body></html>" > /var/www/index.php php -S 127.0.0.1:8080 /var/www/
- usef- 12y agoWhile amusing, I don't think that's a fair comparison as it's not using any framework or persistence features. A Java app can be written similarly: apt-get install tomcat7 echo "<html><body>Hello World</body></html>" > /var/lib/tomcat7/webapps/ROOT/index.jsp (This is untested as I don't have an Ubuntu box at hand – the locations depend on your distro, as with Apache installs.) There actually are sane people in the Java community – underneath the "Java EE" overcomplexity there are some regular old Java web frameworks that are pretty simple and robust. Unfortunately they can be easily overlooked, as the EE community is loud.
- twelve40 12y agoJava is the king of boilerplate, but this PHP snippet (in fact, not even PHP, just HTML) is not equivalent to the tutorial in question. The IntelliJ post covers things like, say, HTML templating or built-in debugger for your web app, which is a bit more than a bash two-liner in the PHP stack as well.