Clean shutdown
I just discovered that the file api/sigint.go
doesn't actually handle receiving any signals other than telling the program to exit. At the very least, I see the following as needing to be implemented there:
-
Cleanly shut down the server -
Close the database connection
Preferably in that order, so the server can finish serving any requests it's in the middle of before the database becomes unavailable.
Creating this issue as a reminder that this needs to be implemented.
Edited by Michael Bryant