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

Possibility to reload server #231

Open
codekraft-studio opened this issue Apr 7, 2017 · 0 comments
Open

Possibility to reload server #231

codekraft-studio opened this issue Apr 7, 2017 · 0 comments

Comments

@codekraft-studio
Copy link

I'm using connect with socketio and I would like to reload the server and then rerun the onCreateServer function.

Something like this:

watch: {
   serverApi: {
       options: {
        livereload: true
      },
      files: ['bin/www.js']
   }
}

where bin/www.js is a file with a running socket server used like this:

connect: {
      options: {
        port: 9000,
        hostname: 'localhost',
        livereload: 35729,
        debug: true
      },
      livereload: {
        onCreateServer: function(server, connect, options) {
            var socketServer = require('./bin/www');
            socketServer(server);
        }
      }
}

So basically when I change the file that handle the socket server, it reload the connect server, so I don't have to do it manually.

I know that livereload is supposed to work on the browser side, but i'm suggesting something similar to reload the connect sever.

Related to: #117 #83 #217

Many thanks in advance.

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

0 participants