So, this morning as I am putting work into creating a ReactJS workflow, it seems that the server side stops with creating the DOM with a super basic `

` element, and the rest is client-side JS.

This is so backwards from the PHP paradigm (at least for WP and similar software). Normally, I'd build the whole HTML doc via PHP, send to client, and modify on client with JS for added functionality like interactive DOM modification. This allows me to add content to the actual HTML server-side with access control and other mods.

In a JS stack paradigm, it seems to be "get the container HTML document to the client ASAP and let the client handle building the page." This hurts access control, because the client has to then make another request for content after the doc is built, and then the server can say "sorry, you don't have access to this. Please login or register..."

Anyone else see this difference? Also, I've found directly deployment can be tricky on cPanel; suggestions? #askNostr

#reactJS #nodeJS #PHP #WordPress #webdevelopment #jsStack

nevent1qqsxu3f4vsk6ula2tv02j98fh5qnqcjh59nj2vsdqm2wx6tynkdem5spz4mhxue69uhhyetvv9ujuerpd46hxtnfduhskwt3km

Reply to this note

Please Login to reply.

Discussion

Nextjs has server side rendering similar to PHP if you wanna stick to that paradigm. (Better for SEO)

Cpanel sucks, would avoid if you can. A lot of these js frameworks already have a web server built in and they usually conflict with cpanel bloat

cPanel is a useful multi-site management backbone, and it's perfectly fine with a CloudFlare speedup. Definitely made for PHP hosting, though. I do agree, there's some conflict with routing traffic. Refreshing a page with a non-zero path causes the site to break, and I have to go back to root and refresh to get it to come back. Pretty annoying as I'm learning.

I found that the routing issue doesn't come up with the "hello world" basic NodeJS install (just an "It works!" message with version No.), only when I've uploaded my own code.

James, DM me. I might be able to help you work through this.

Sure 🤙