News for hackers. Stuff that matters.
Re:PHP is worth learning and using by tlackemann on Thursday November 18, 2021 @08:24AM (#29265078)
I don't find this to be true at all.

> you need an external server

Spoiler, you need an external server for everything on the web; you've just been brainwashed to think serverless is actually that.

Re:PHP is worth learning and using by boudin on Thursday November 18, 2021 @12:26PM (#29267996)
What are you talking about?

Lots of languages and frameworks make it easy to be self-hosted with there own server. In Python, .net, Go, Rust this is quite common.

This means that your app can be a self-contained app + server and the server part can have some business logic as well.

With Go, .net, Rust apps (and potentially others) that's quite nice to be able to produce a single binary app that you can just run anywhere without installing any framework or setting up any external server and it's ready to listen to incoming queries.

That can even be a good enough setup for home things that are not exposed to the web and where setting up reverse proxies could be overkill.

Re:PHP is worth learning and using by __MatrixMan__ on Thursday November 18, 2021 @09:33AM (#29265824)
Good point, but just to nitpick: I think that ipfs-js let's your external server be a process in someone else's browser, which is about as unserverlike as servers get.
Re:PHP is worth learning and using by thecatspaw on Thursday November 18, 2021 @08:27AM (#29265102)
You do not need an _external_ server for a lot of languages. If you use node for example you can use the express package to run a custom server, or embedded tomcat for java
Re:PHP is worth learning and using by tlackemann on Thursday November 18, 2021 @08:30AM (#29265135)
I suppose, but I've never encountered a production site that was using Gunicorn or similar as a true server. Usually that's coupled with something like Nginx or HAProxy.

So yeah, you technically don't need one for Ruby or Node.js, but I sure would.

Re:PHP is worth learning and using by redm on Thursday November 18, 2021 @08:51AM (#29265307)
PHP has a built in web server you can launch from the CLI and run the script. `php -S <address:port>`