ForkbombEu / ncr

no‧code‧room: No code REST API server based on zencode natural language smart contracts
4 stars 2 forks source link

When live reload without a specified port ncr borking! #283

Closed puria closed 1 month ago

puria commented 1 month ago

To reproduce, try to run: ncr -z contracts

it runs on a port that is printed out. If you open the swagger openapi it works.

Now add a new file inside contracts like hello.zen.

ncr reloads. Print the same port (I guess is fake) and the swagger openapi is not available anymore!

matteo-cristino commented 1 month ago

This issue is really strange, what I have discovered doing some test is that if you open swagger and then add a new file then no new socket is created and the app die silently. On the other hand if you start ncr, add a file, then open the swagger and add another file the app works super fine.

Unfortunately I have not discovered why this is happening yet 😧

matteo-cristino commented 1 month ago

The solution seems to be to not shut down and restart the whole app but just to update the endpoints that were changed 👾