
Gulp.js
- 1 ответ
- 0 вопросов
1
Вклад в тег
cd /usr/local/bin
# create symlink
ln -s /Applications/ngrok ngrok
ngrok -h
ngrok http 8080
~/.ngrok2/ngrok.ymlD
npm install ngrok -g
.....
var ngrok = require('ngrok'), //замена localtunnel, inspector => http://127.0.0.1:4040
.....
var config = {
server: {
baseDir: "./build"
},
//tunnel: true,
host: 'localhost',
port: 1984,
directoryListing: true,
logPrefix: ''
};
gulp.task('webserver', function () {
//browserSync(config);
browserSync(config, function (err, bs) {
ngrok.connect({
proto: 'http', // http|tcp|tls
addr: bs.options.get('port'), // port or network address
}, function (err, url) {
gutil.log('[ngrok]', ' => ', gutil.colors.magenta.underline(url));
});
});
});