Skip to content

[BACKEND] Add graceful shutdown and DB pool cleanup #40

Description

@Trovic1

Summary

Handle SIGINT/SIGTERM to close the HTTP server and the Postgres pool cleanly.

Scope

  • backend only

Likely files

  • src/app.js (or server entry)
  • src/lib/db.js (close)

Acceptance criteria

  • On signal, in-flight requests finish, then the pool closes
  • Process exits without hanging connections
  • No errors logged on normal shutdown

Verification

  • Start the server, send SIGTERM, confirm clean exit

Labels: backend, enhancement, good first issue


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions