I need to use Vagrant to run an Angular project so we can do testing in specific OS environments.
I have managed to set Vagrant up and started an Ubuntu VM. I can SSH into the VM and access my files in the host machine through it as well, which seems like an important step.
I tried accessing the host directory from the VM and running the command ng serve
but it simply loads up to 10% and then stops without any error message. After some research I think I have to do this through port forwarding which I don't have much (or any) experience with.
We usually use nginx to serve and test the project, how can I do this but make it run in the Ubuntu virtual environment? How can I configure my Vagrantfile?
I wouldn't recommend to use a shared directory. I believe you have stored your project in any Git. Clone the project on your VM and serve it from a local directory.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.