-
Notifications
You must be signed in to change notification settings - Fork 78
Description
I have a little issue with understanding of proxies of gulp-webserver package.
I need to proxy my localhost 8080 to make it accessible from the outside. But I don't quite understand how I can do it with gulp-webserver proxies property.
Here I have my piece of code:
gulp.task('server', function(){
gulp.src('dist')
.pipe(webserver({
livereload: true,
open:true,
port:8080,
host: '0.0.0.0',
proxies:[
{
source:'/hello',
target:'http://localhost:8080/hello'
}
]
}));
});
But when I'm trying to reach http://localhost:8080/abc, it gives me next mistake:
Error: connect ENOBUFS 127.0.0.1:8080 - Local (undefined:undefined)
at Object.exports._errnoException (util.js:856:11)
at exports._exceptionWithHostPort (util.js:879:20)
at connect (net.js:843:14)
at net.js:985:7
at GetAddrInfoReqWrap.asyncCallback as callback
at GetAddrInfoReqWrap.onlookup as oncomplete
So such proxy has to give acces by simply entering the address http://localhost:8080/hello in any browser?
How can I make my localhost accessible from outside with gulp-webserver?
P.S. I used host: '0.0.0.0' - but it says that such host is no longer available.