What’s the best way to host a Vite website on EC2?

0
7
Asked By TechNinja42 On

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

Answered By CodeWizard77 On

Instead of going through all that, have you considered using S3 with CloudFront? It can simplify your deployment and hosting process quite a bit.

Answered By TechNinja42 On
Answered By DevGuru88 On

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

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.