0

So I have a simple Ember.js app which communicates with a node.js server using websockets. The stream server doesn't serve the actual ember app - just various bits of data. Can I have ember-cli automatically re-run my server code when a file is changed inside it?

My workflow is currently

ember s

node ./stream_server/index.js -p 4201

Now I can edit frontend stuff and have everything automatically update. Great! However, if I make a change to my server code, I have to manually go in and C-c it, and re-run node ./stream_server/index.js -p 4201. This gets kind of boring when I know that somewhere in Ember, there's a watcher that's already doing this for frontend stuff.

So, any chance of this working? Or do I just use some other watcher tool to do it?

Cheers,

Carl

Carl Lange
  • 113
  • 1
  • 6
  • 2
    You could use nodemon to restart ur server. Or this answer may help http://stackoverflow.com/a/25186201/548568 – blessanm86 Feb 29 '16 at 11:31
  • Yes, I'm using nodemon for now. The api-stub answer seems a little like a hack for what I'm looking for though. Thanks! – Carl Lange Feb 29 '16 at 13:20
  • If you are trying to mock your API. ember-cli mirage is kinda becoming a popular way to go. https://github.com/samselikoff/ember-cli-mirage – blessanm86 Feb 29 '16 at 13:41
  • Not really trying to mock my API - I've got a totally separate streaming server, rather than using an Ember-Data endpoint. – Carl Lange Feb 29 '16 at 16:08

0 Answers0