brunomgmateus
How to host a full stack Nuxt3 app on cPanel
Sorry for the late reply. You can host it, but there's a couple of pre-requisites.
This github discussion has more details.
https://github.com/nuxt/nuxt/discussions/25910#discussioncomment-10396305
5 replies
Build Nuxt 3 as CommonJS
Sorry for the late reply, but just to let you know that I've come accross an issue where, if you're using the setting "experimental.writeEarlyHints" in nuxt.config.ts, it breaks production version in cPanel, Plesk (and other serverrs that use either nginX or Phusion Passenger).
11 replies
Quick Question - Supabase Client Fetch vs API route fetch
It should be the same result AFAIK, but to me using server api brings a better workflow, as it becomes easier and cleaner to handle as the project increases in size.
Not only fetching logic becomes separated, but the data fetching is actually done on the server side, instead of possibly exposing the fetched resource server on the client and possibly CORS errors (but it can also be mitigated with 'server: true' when fetching directly).
Defining allowed methods is also a breeze, as is the whole api structuring.
Also, if you would like to access that data from other apps, or php, etc, you would just point it to the endpoint.
However, pay attention to securing your api, as I've seen the wild endpoints that delete stuff from database without any protection. Just something to be aware of.
2 replies