Open ivanjeremic opened 2 years ago
I can see why the readme could create confusion, but this module does not reload any code from disk. This module is useful if you are defining routes from a database and/or a config file.
If you want to hot-reload code, you would need to implement that yourself as for now. I'm currently exploring how to implement that feature with https://github.com/mcollina/fastify-isolate.
I can see why the readme could create confusion, but this module does not reload any code from disk. This module is useful if you are defining routes from a database and/or a config file.
If you want to hot-reload code, you would need to implement that yourself as for now. I'm currently exploring how to implement that feature with https://github.com/mcollina/fastify-isolate.
Ok I understand, yes it was confusing at first to me looking at the readme. However hope to see that working soon because reloading from disk without loosing requests would be very powerful.
Prerequisites
Issue
It says I can add dynamically routes and plugins without loosing request but something is not working for me. I also use
autoload
so I started this server and while the server is running I added a new route in one of my plugins, then I hit the endpoint/refresh
(which is also part of the official example) to refresh the app without downtime and get the new route working but hitting/newroute
does not work, all I get is a404
with"Route GET:xx not found"
but after a shutting down the server and starting again the new route works, so maybe I'm missing something here any idea?