I’m experimenting with vue-wordpress and I would like to make it working with Trellis. The package has NPM’s script for development -
npm run dev - that starts the Node process that allows me to develop the Vue.js code.
If I understand my setup right, I need to start this process on my Trellis machine. So I did this:
- Added geerlingguy/nodejs ansible role to install Node and NPM to my Trellis.
- Successfuly ran
npm run dev, which started the process on the Trellis machine on the port 8080.
- Added the following into my
Vagrant.configure('2') do |config| # existing Trellis code config.vm.network "forwarded_port", guest: 8080, host: 8081
When I access
http://localhost:8081 in my browser (Chrome, OSX), I see the following error: “This site can’t be reached / The connection was reset.”.
How do I forward the port correctly? I believe Trellis does something similar with Mailhog but I have not been able to find the code responsible for that.
Also I apologise for my possible ignorance - I’m a front-end guy who does not know very much about virtual machines.
Thank you very much!