reload: reload.js is not found

the reload isn’t working for me, and on checking direct access to the JS URL, the file isn’t being served.

http://localhost:4040/reload/reload.js

I added the file itself directly to my own pubilc/js dir and now things work fine.

any idea why the JS file isn’t automagically being served?

I’m using a vanilla express app setup with the generator so it’s quite confusing.

  debug('using hot reloader');
  var http = require('http');
  var reloadServer = http.createServer(app);
  let delay = 300;
  reload(reloadServer, app, delay);
  reloadServer.listen(app.get('port'), function() {
    console.log("Reload server listening on port " + app.get('port'));
  });

this block ^ also prints out the right port #

confused!

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 2
  • Comments: 25 (9 by maintainers)

Most upvoted comments

@alallier I resolved my problem. I had put reload(server, app) before error handlers .

@EleanorMao It seems we are talking about two different problems here, one being you couldn’t get the sample app to work and second a websocket issue.

Why didn’t the sample app work? Can you provide more details here?

Same for the second comment.

The first step is to see why you can’t run the sample app and then worry about integrating reload later.