M
M
Mr Freeman2016-11-07 17:44:43
go
Mr Freeman, 2016-11-07 17:44:43

How to set up ports in vagrant + golang so that the host machine's browser opens?

Hello everyone, I can't open a go application in the browser on the host machine.
That is, I prescribe, for example, on the guest machine:
http.ListenAndServe("localhost:3000", nil)
In the vagrant config:
config.vm.network "forwarded_port", guest: 3000, host: 30
That is, the site should be accessible on the host machine at / localhost: 30 ?? But that doesn't work. Or how to set up, please tell me.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2016-11-08
@index0h

Ports up to 1000 require superuser rights.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question