Dear Astro community.
I am planning to expose Astro to end-user thru API for user to "customize[only background color]" of their astro page.
I was thinking about this workflow :
- user1 submit their color of choice thru my front end
- my front-end then pass the color code to an API endpoint.
- the API trigger a script to change the
user1.envassociated to that particular user. - the API trigger a script to change the
user1.config.mjsassociated to that particular user. - then it triggers
npm run build --config "user1.config.mjs" - it then export the html result to cloudflare pages.
two questions :
- is this the best way to do this?
- if this is the best way to do this, what happen if there are three user costumizing their site at the same time?
Thank you,