4 ms·
You're right that I was simplifying the Express bit (or maybe a lot), but let me try to make that part a bit more clear. You can have a top-level node.js file t
by woojoo666 4y ago
You're right that I was simplifying the Express bit (or maybe a lot), but let me try to make that part a bit more clear. You can have a top-level node.js file that uses Express and imports all files in a given folder as routes. Then you can get the "putting files in directories, copying files around, making backup copies of files, and so on". It will take a bit more elbow grease to get the "without ever taking their entire site down with a parse error at startup", but still possible. And if a host like GoDaddy wanted to have this as a preconfiguration on their servers, they could. My point was that the UX that you are describing, is possible in any framework or language, given the right infrastructure pre-installed on the web server (which you have for PHP). So it's less about PHP not being popular, and more about this UX not being as popular anymore. My guess for the reason, is that even beginners find the modern workflows and popular hosting options intuitive and easy to use.
- kragen 4y agoYes, you could implement PHP in node.js, or indeed in any language on any platform as long as it has files. You could do a better job of it by not botching the programming-language design, too. As far as I know, though, nobody has, and there is a significant difference between software that could hypothetically be written and software that actually exists. As I said elsewhere I think a lot of beginners are programming instead in Roblox and hosting their sites on Wordpress or something.