queerviolet / bones

MIT License
36 stars 119 forks source link

Synchronize db before server listen #34

Closed glebec closed 7 years ago

glebec commented 7 years ago

There is a race condition in the server start; it listens on a port without waiting for the database to finish syncing. While this almost certainly will not cause any problems in practice (how often does a request come in during the interval between starting the server and the db syncing?), it will be easy enough to implement the fix and demonstrate good practices.

glebec commented 7 years ago

Closing following comments in https://github.com/FullstackAcademy/bones/issues/64.