by adambrenecki · 10y ago · 0 comments
Got a simple Hello World PHP site? Open your SFTP client, drag and drop, done.
Got a Hello World Python app? You have to know about WSGI adapters, process monitors, usually some sort of reverse proxying, how you're going to handle your static files, and so on.
Oh, and let's not forget that to even get to that point, you needed to use a framework of some kind, which meant wrestling with Pip and virtualenvs; you can't just 'echo "Hello World"'.
I'm picking on Python here because web dev in Python is my day job, but the story is similar for many other languages.
#!/usr/local/bin/python2
import cgi
print "Content-type: text/html\n\n"
query = cgi.FieldStorage()
if "name" in query:
print "Hello, %s!" % query["name"].value
else:
print """
<p>Insert your name and hit Go! to get greeted!</p>
<form action='/cgi-bin/hello-py.cgi' method='get'>
<input type='text' name='name'/>
<button type='submit'>Go!</button>
</form>"""
chmod 750 and go.Though that might be mitigated somewhat by things like Heroku and App Engine. My first Python code was with the latter, and I didn't even realise I was using it.
Of course it introduces a few of its own but on the whole I'd say Node is definitely easier to work with for a newcomer.