drakov icon indicating copy to clipboard operation
drakov copied to clipboard

Add watch option to reload API

Open shavo007 opened this issue 8 years ago • 2 comments

Creating a new issue just to keep tabs. #120

Related to the above pull request.

Need an option in drakov.run to watch the md files and reload.

Similar to:

grunt.registerTask('mock-api', 'Start drakov server', function() {
var done = this.async();

var drakovOptions = {
  sourceFiles: './doc/*.md',
  serverPort: 3000,
  autoOptions: true,
  delay: 1000,
  watch: true
};

drakov.run(drakovOptions, function(err){
  console.log('-- STARTED --');
  if (err) {
    throw err;
  }
});
done();
});





shavo007 avatar Apr 19 '16 01:04 shavo007

I believe this is a limitation of our current watch implementation, which only currently works from the CLI

Something to consider for a future update I think

yakovkhalinsky avatar Jul 05 '16 18:07 yakovkhalinsky

It would be best if it was documented (in the root readme) that this is not yet available from the option object passed to .run.

emileber avatar Mar 09 '18 19:03 emileber