I'm currently using Jenkins and Ansible for my deployment process. Whenever I commit changes to my repository, it triggers a deployment that builds my Vite app and sends the build folder to my EC2 instance. I'm looking for guidance on how to serve that build folder so I can access my website through a URL. I've been using 'npm run start' for production, but I know that's not the best approach. What are the recommended steps to set this up correctly?
3 Answers
Instead of going through all that, have you considered using S3 with CloudFront? It can simplify your deployment and hosting process quite a bit.
You can run 'npm run build' to create your production files, and then you just need to set up a web server like Nginx to serve those files from the build folder.
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads