4 ms·
PHP needs to be hosted on a server that can parse PHP. Astro generates HTML so can be hosted anywhere that can serve HTML.
by aembleton 1y ago
PHP needs to be hosted on a server that can parse PHP. Astro generates HTML so can be hosted anywhere that can serve HTML.
- nchmy 1y agoWhat? Astro needs to run on a server that can run node etc And php can equally have its html cached.
- aembleton 1y ago> Astro needs to run on a server that can run node etc It needs to run on your computer to generate the HTML, but you can just run npm run build then copy the contents from the dist folder to your apache server, or whether you want to host it. At least, thats how I do it. I haven't used PHP for about 20 years so I'm sure its changed a lot.
- nchmy 1y agoBut what you're describing could be done for php, or any other backend language/framework... There's nothing unique to Astro in this regard.
- aembleton 1y agoI'm not a frontend developer so I'm ignorant about this stuff so that's the first I've heard of it. Do you know how you can do this in spring? Let's say I used Thymeleaf, is there a maven target I can use to walk over a database and generate every iteration of a html website?
- nchmy 1y agoi dont know anything about spring, thymeleaf etc... I assume google or llms could point you in the right direction. At worst, you could just literally crawl your site with http requests and cache the result. You could even do it from cloudflare workers and with the right caching headers could cache it all in cloudflare cdn.
- deleted 1y ago[deleted]