Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server is stucked on start and nothing happens. #146

Open
interist32 opened this issue Jul 8, 2020 · 1 comment
Open

Server is stucked on start and nothing happens. #146

interist32 opened this issue Jul 8, 2020 · 1 comment

Comments

@interist32
Copy link

Hi,

I start livereload.listen() in watch task of my Gulp file and it looks like the server is trying to start, but then stops at a certain moment. Here's debugging information:

[21:57:29] Starting 'serve'...
  tinylr:server Configuring HTTP server +0ms
  snapdragon:compiler initializing C:\projects\outrun\node_modules\snapdragon\lib\compiler.js +0ms
  snapdragon:parser initializing C:\projects\outrun\node_modules\snapdragon\lib\parser.js +6ms
  snapdragon:compiler initializing C:\projects\outrun\node_modules\snapdragon\lib\compiler.js +9ms
  snapdragon:parser initializing C:\projects\outrun\node_modules\snapdragon\lib\parser.js +6ms
  gulp:livereload now listening on port 35729 +0ms
  snapdragon:compiler initializing C:\projects\outrun\node_modules\snapdragon\lib\compiler.js +60ms
  snapdragon:parser initializing C:\projects\outrun\node_modules\snapdragon\lib\parser.js +2ms
  snapdragon:compiler initializing C:\projects\outrun\node_modules\snapdragon\lib\compiler.js +2ms
  snapdragon:parser initializing C:\projects\outrun\node_modules\snapdragon\lib\parser.js +1ms

As we can see from the debugging log it says it listening on the port 35729. If I open the browser with this port I see

{
tinylr: "Welcome",
version: "1.1.1"
}

But not the content I'm trying to serve. I suppose I should specify the directory where it should serve from, but can't find how to do it.

I use:

  • Windows 10
  • Gulp 4.0.2
  • gulp-livereload 4.0.2

Gulpfile.js:

const {series, parallel, src, dest, watch} = require('gulp');
const concatCss = require('gulp-concat-css');
const del = require('del');
const config = require('./config');
const livereload = require('gulp-livereload');

function clean(cb) {
  return del([config.distFiles]);
}

function css() {
  return src(config.css.sourceFiles)
      .pipe(concatCss(config.css.bundleName))
      .pipe(dest(config.distDir))
      .pipe(livereload());
}

function copyAssets(cb) {
  return src(config.html.sourceFiles)
      .pipe(dest(config.distDir))
      .pipe(livereload());
}

const build = series(clean, parallel(copyAssets, css));

exports.build = build;

exports.serve = function() {
  livereload.listen();
  watch(config.sourceFiles, {delay: 500}, build);
};
@interist32
Copy link
Author

Seems like this package doesn't include any server to serve static and only provides livereload itself. Sorry for confusing and please feel free to close the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant