Skip to content

Instantly share code, notes, and snippets.

@ben-w-smith
Created February 26, 2016 18:34
Show Gist options
  • Save ben-w-smith/6b9fe59b481969d55085 to your computer and use it in GitHub Desktop.
Save ben-w-smith/6b9fe59b481969d55085 to your computer and use it in GitHub Desktop.
Gulp with BrowserSync with ngrok
var gulp = require('gulp');
var browserSync = require('browser-sync').create();
var ngrok = require('ngrok');
gulp.task('default', function() {
browserSync.init({
server: {
baseDir: "./public"
}
}, function(err, bs) {
ngrok.connect(bs.options.get('port'), function(err, url) {
console.log(' -------------------------------------');
plugins.util.log('\r', ' NGROK:', plugins.util.colors.magenta(url));
console.log(' -------------------------------------');
});
});
// watch tasks go here
});
@yogiprsetya
Copy link

console.log and plugins.util.log not print enything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment