()
| 144 | let stopping = false; |
| 145 | |
| 146 | const shutdown = async () => { |
| 147 | stopping = true; |
| 148 | console.log("\n[dev-db] Shutting down"); |
| 149 | await server.stop(); |
| 150 | await db.close(); |
| 151 | process.exit(0); |
| 152 | }; |
| 153 | |
| 154 | process.on("SIGINT", shutdown); |
| 155 | process.on("SIGTERM", shutdown); |