Skip to content

**<sub><sub>![P1 Badge](https://img.shields.io/badge/P1-orange?style=flat)</sub></sub> Importing non-existent Express app in Worker** #22

@chitcommit

Description

@chitcommit

P1 Badge Importing non-existent Express app in Worker

The Worker fetch handler imports ./index.js expecting a default Express app and then calls app(mockReq, mockRes), but server/index.ts does not export an app—it bootstraps an HTTP server and returns nothing—so this destructuring yields undefined and the Worker will throw TypeError: app is not a function on every request. The new Cloudflare deployment will therefore 500 immediately unless the Worker imports a real handler or the server entry exports one.

Useful? React with 👍 / 👎.

Originally posted by @chatgpt-codex-connector[bot] in #19 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions