How to update / hot reload application?


#1

Hi,

I’m staring with OS.js.
Can’t say it’s easy to get into, still making myself confortable, but I can see the huge amount of work behind it.
So kudos and thanks.

I guess I’ll bother you with quiet a few questions down the line, but this first one might be the most important for me:

How do I update my applications? I mean swiftly update, to iterate on testing? Ideally even implement hot reloading for it?

For the client code, I do webpack --watch, so I know how to keep it up to date.
And relaunching the app is fine (although if there is a way to auto-relaunch the app on client build, please du say so).

But I cannot figure a way of reloading the server part of my application.
So far to see a change on the server part of an app, all I could find is relaunching the whole OS.js solution.
That is not convenient… so I figured you have a better way? Hopefully?

Thanks,
Regards


#2

Hi.

I’ve added some basic reload functionality for packages, but it’s not really working well. I usually just open the app, save the session and refresh (Ctrl+R) it when it’s not working.

The server should signal the client and automatically reload the app.

As for the server-side of things, I haven’t figured out how to do reloading properly. You can use nodemon to automatcally restart though.

Currently I don’t really have time to look at improving this (a bit busy with work stuff), but if you have some ideas here let me know!


#3

Ok. I’ll have a check at how you do this.
Thanks for the quick answer.


#4

Great!

Maybe you could open an issue about this on Github ? It’s easy to forget about stuff that goes into the forums and chat because I go between so many different projects all the time :sweat_smile:

I might have a bit of time this weekend to look at this though. I’ll post a message about this when the time comes.


#5

I filed an issue about this here: https://github.com/os-js/OS.js/issues/768