Learn, Share, Build

152
October 14, 2017, at 00:06 AM

I am trying to configure Gulp and BrowserSync to load my BASE app using the following URL: http://htmlsandbox.sites.dev but it keeps on loading it at http://localhost:3000/ I am not sure where my configuration goes wrong. Here is the content of my gulpfile.js Thanks for any help:

'use strict';
// Project configuration
var url         = 'http://htmlsandbox.sites.dev';
//Load PLugins
var browserSync = require('browser-sync').create('HTML Sandbox'),
    del = require('del'),
    gulp = require('gulp'),
    autoprefixer = require('gulp-autoprefixer'),
    cache = require('gulp-cache'),
    cssBase64 = require('gulp-css-base64'),
    imagemin = require('gulp-imagemin'),
    inlinesource = require('gulp-inline-source'),
    notify = require('gulp-notify'),
    sass = require('gulp-sass'),
    sourcemaps = require('gulp-sourcemaps'),
    uglify = require('gulp-uglify'),
    path = require('path'),
    runSequence = require('run-sequence');
// Task to compile SCSS

// Minify Images
// BrowserSync Task (Live reload)
gulp.task('browserSync', function () {
  browserSync.init({
    server: {
      baseDir: "./src/",
            proxy: {
                target: url,
                port: 8080,
                tunnel: "htmlsandbox"
    }
  });
});
// Gulp Inline Source Task
// Gulp Watch Task
gulp.task('watch', ['browserSync'], function () {
  gulp.watch('./src/scss/**/*', ['sass']);
  gulp.watch('./src/**/*.html').on('change', browserSync.reload);
});
// Gulp Clean Up Task
gulp.task('clean', function () {
  return del('dist');
});
// Gulp Default Task
gulp.task('default', ['watch']);
// Gulp Build Task
gulp.task('build', function (callback) {
  runSequence('clean', 'sass', 'imagemin', 'jsmin', 'inlinesource', callback);
});
READ ALSO
Learn, Share, Build

Learn, Share, Build

I need to make a bilingual bot using Nodejs and Microsoft Bot Framework

195
Learn, Share, Build

Learn, Share, Build

I have a NodeJs based scalable architecture, I want to log all the logs into single placeBut in case load balancing, system logs will be scattered to multiple VMs

131
Learn, Share, Build

Learn, Share, Build

What is command to get latest version of Expressjs which is already installed? What is command to upgrade to latest version ?

176
Learn, Share, Build

Learn, Share, Build

How can I debug the MongoDb aggregation steps using native mongodb driver for nodejs Node

149