KangJiYoung13 KangJiYoung13 - 1 year ago 82
Javascript Question

Make gulp run on my server non-stop

Is there any solution I can make gulp working on my server without me needing to connect with SSH and the writing

gulp js:watch sass:watch
This is my current gulpconfig.js

var gulp = require('gulp');
var sass = require('gulp-sass');
var sassGlob = require('gulp-sass-glob');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');

gulp.task('js:build', function() {

gulp.task('js:watch', function() {
gulp.watch('js/*.js', ['js:build'])

gulp.task('sass:build', function () {
return gulp

gulp.task('sass:watch', function() {
gulp.watch('css/**/*.scss', ['sass:build'])

Answer Source

The screen program for linux is exactly what you are looking for:

  • Install screen
  • Open a new screen session: screen -dR
  • Start gulp
  • Disconnect from your screen session: CTRL-A, d

Run a command in a shell and keep running the command when you close the session