Answer the question
In order to leave comments, you need to log in
Why do they make 2 different servers when building Gulp?
I watch a video for beginners on React and Express.
The author of the video makes such an assembly of Gulpfile, but does not explain WHY he needs 2 different server plugins, while gulp-live-server is generally some kind of unpopular one, why use it here?
var gulp = require('gulp');
var LiveServer = require('gulp-live-server');
var browserSync = require('browser-sync').create();
var reload = browserSync.reload;
gulp.task('live-server', function() {
var server = new LiveServer('server/main.js');
server.start();
});
gulp.task('serve', ['live-server'], function() {
browserSync.init(null, {
proxy: "http://localhost:7777",
port: 9001
});
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question