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.
Admittedly I've since added the ability to run the python directly, passing in a json file, which makes development much easier all around. So this is less important than it was two days 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 ofnode-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