Open

Description
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.
Many thanks in advance.
Metadata
Metadata
Assignees
Labels
No labels