Skip to content

Bug: Routes return 404 on Windows #136

@rogerio-gmm

Description

@rogerio-gmm

Description:
Routes are not being registered correctly on Windows, causing all requests to return 404 Not Found errors.

Environment:

  • OS: Windows 10/11
  • Node.js: 24.8.0
  • the-fake-backend: 3.12.0

Steps to Reproduce:

  1. Create a server with routes on Windows
  2. Make a request to any route
  3. Receive 404 instead of expected response

Expected Behavior:
Routes should work on Windows like they do on macOS

Root Cause:
The code uses path.join() which uses backslashes on Windows, but Express routes need forward slashes.

Proposed Solution:
Use path.posix.join() instead of path.join() for route paths.

I have a fix ready #137 if this is acceptable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions