remult / remult

Full-stack CRUD, simplified, with SSOT TypeScript entities
https://remult.dev
MIT License
2.88k stars 125 forks source link

Provide an option to crash the remultExpress server if ensureSchema fails #297

Closed sefininio closed 7 months ago

sefininio commented 11 months ago

Is your feature request related to a problem? Please describe. When deploying to GCP, pods can't be loaded with dependencies on other pods - so the server might load before the DB instance and ensureSchema will fail silently. This scenario is better treated with exit 1 so the pod will restart itself until success.

Describe the solution you'd like Add an optional option to remultExpress (defaults to false) that if true, will crash the server when ensureScheme fails.

noam-honig commented 11 months ago

checkout remult@0.23.0-exp.29

noam-honig commented 7 months ago

@sefininio can you check it out and let me know if it's ok?

sefininio commented 7 months ago

Oh, I completely missed the previous comment (on the same freaking day! - amazing) I'll try to bring up an env where this can be tested. Thanks!

sefininio commented 7 months ago

Yes, that works! I now get failed ensure schema of players Error: connect ECONNREFUSED which is awesome , thanks man!

noam-honig commented 7 months ago

Great - closing the issue