I want to publish my project that are written in ReactJS and VueJS to a Ubuntu VPS. I recently learned making frontend applications using ReactJs and VueJS. but I don't know how to publish them. So hope everyone guide me. Thank you!
-
You have to create production builds using the mentioned frameworks. For example npm run build for React. You then take the build folder and deploy it using something like apache. Or you can create your own server using something like nodejs to serve the built assets.Muljayan– Muljayan2020-09-12 11:11:20 +00:00Commented Sep 12, 2020 at 11:11
-
If your goal is to publish pages, not use ubuntu vps, you can try github pages, netlify or google firebase.Daniel– Daniel2020-09-13 07:09:07 +00:00Commented Sep 13, 2020 at 7:09
1 Answer
You need to learn server like:
- Nginx
- Apache2
It is worthy to learn also docker and docker-compose.
I am using:
https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion
to connect SSL by Let's Encrypt
I recommend your to use docker on ubuntu using this doc:
https://cli.vuejs.org/guide/deployment.html#docker-nginx
and mentioned before package to manage SSL.
To connect knowledge from these tutorials there is worth to go through the docker-compose tutorial that allows writing config of a docker container in a declarative way:
https://docs.docker.com/compose/
It is written for python, but it is one of the best tutorials that I have seen.