alexa-app-server icon indicating copy to clipboard operation
alexa-app-server copied to clipboard

Hotswap broken

Open jbeuckm opened this issue 8 years ago • 11 comments

I have subfolders in some of my apps. Hotswap will reload for index.js but not for my other js files in the subfolders. How can I get hotswap to listen to all files in my app's hierarchy?

jbeuckm avatar Jun 21 '16 18:06 jbeuckm

From the hotswap readme...

And then add this line to modules you want to be reloaded (it tells node-hotswap to watch this file):

module.change_code = 1;

jbeuckm avatar Jun 23 '16 03:06 jbeuckm

I get the message hotswap reloaded but I don't see those changes until I kill the server and start it again. :/

aaronrogers avatar Mar 02 '17 19:03 aaronrogers

I can second that, lets reopen this issue.

dblock avatar Mar 03 '17 12:03 dblock

same here i also tried adding a "console.log()" to the index.js file and it dos seem to load the module and print the log message but does not change the in-memory app

Bldr avatar Mar 06 '17 12:03 Bldr

Thanks, @aaronrogers. I have the same issue - glad you recorded it!

rickwargo avatar Mar 06 '17 14:03 rickwargo

There is another module called hotmop. While I haven't tried it myself, it's worth a try in place of node-hotswap.

tejashah88 avatar Mar 06 '17 17:03 tejashah88

seems like it doesn't usually work here, either

ericblade avatar Mar 22 '17 22:03 ericblade

Not working for me either.

kosmjon avatar Jun 09 '17 17:06 kosmjon

Not working for me either.

OS: macOS 10.12.5 Node: v6.10.3 NPM: 3.10.10

dhalucario avatar Jul 05 '17 09:07 dhalucario

Looking for some PRs!

dblock avatar Jul 05 '17 19:07 dblock

It's not totally ideal in terms of efficiency, but for most use-cases node-dev is sufficient during dev:

npm install -g node-dev
node-dev server.js

On change, the server reboots and the app restarts.

damassi avatar Aug 18 '17 00:08 damassi