OpenFn / apollo

GNU Lesser General Public License v2.1
0 stars 2 forks source link

Remove nodemon #49

Closed josephjclark closed 6 months ago

josephjclark commented 6 months ago

In dev mode, I want developers to be able to make a change to their python script and call the server endpoint to test it WITHOUT having to restart the server first. I've been doing this in dev for a while and it's a right pain.*

We use nodemon to hack a solution together, but for various reasons I don't like it.

I am hoping that node-calls-python will soon allow us to re-import a python file each time we call it. Which sort of defeats the point of node-calls-python really, but makes life much easier for us a dev time.

Bun natively supports hot-reloading, which is neat. But you can't configure the watch to reload when python changes. And even if you could the hot reload doesn't actually kill the process and I'm not convinced the python context will actually be rebuilt.

So I've setup a watch with nodemon which will kill the whole server process on change to ts or py files. It's fine but it feels like an unnecessary and inelegant workaround.

I've got an issue on node-calls-python to track better module reloading, see https://github.com/hmenyus/node-calls-python/issues/78

josephjclark commented 6 months ago

The work has already been done at the node-calls-python end, so I'll go on and sort this out today