Skip to content

Improve proxy server testability #1633

@kmcginnes

Description

@kmcginnes

The proxy server package (graph-explorer-proxy-server) has most of its logic in a single node-server.ts file that is difficult to test in isolation. Route handlers, middleware, server creation, and configuration resolution are all interleaved in module-level code.

This task tracks the work to decompose the proxy server into focused, independently testable modules:

  • Extract createApp() — Express app with routes and middleware, testable via supertest
  • Extract createServer() — HTTP/HTTPS server creation decision
  • Extract resolveServerConfig() — Port selection, HTTPS detection, certificate paths, base URL
  • Add global test setup with credential safety mocks (prevent real AWS credentials or HTTP requests in tests)

Remaining work was split into separate issues:


Important

If you are interested in working on this issue, please leave a comment.

Tip

Please use a 👍 reaction to provide a +1/vote. This helps the community and maintainers prioritize this request.

Metadata

Metadata

Assignees

Labels

infrastructuretech debtIssues, typically tasks, that are mainly about cleaning up code that is problematic in some way

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions