What’s the Best Way to Host My Vite Website?

0
0
Asked By CrazyCactus97 On

I've got Jenkins and Ansible configured to trigger deployments whenever I commit to my repo. This builds my Vite app and sends the generated build folder to my EC2 instance. However, I'm not sure how to properly serve this build folder so I can access my website via a URL. Currently, I use 'npm run start' for production, but that feels off. Any suggestions on how to do this right?

2 Answers

Answered By BlueRaccoon45 On

Have you thought about using S3 with CloudFront? It's a really efficient way to host static sites, and it can simplify your setup a lot.

CrazyCactus97 -

That sounds interesting, but I already have a CI/CD pipeline in place. I'm looking for something that integrates well with that.

Answered By QuickFox22 On

You could run 'npm run build' to generate your static files and then serve them using a web server like nginx. It’s pretty straightforward once you set it up!

CrazyCactus97 -

I considered nginx, but I'm curious why other platforms like Vercel make it seem so easy. Is there a simpler option?

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.