Skip to content

Conversation

@fraxken
Copy link
Member

@fraxken fraxken commented Nov 30, 2025

No description provided.

@fraxken fraxken force-pushed the refactor-http-server branch from e3c48bc to 6fa3f5f Compare December 1, 2025 14:37
@fraxken fraxken marked this pull request as ready for review December 1, 2025 14:38
@fraxken fraxken requested review from PierreDemailly, clemgbld and Copilot and removed request for PierreDemailly December 1, 2025 14:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the server implementation by replacing the Polka framework with native Node.js HTTP server and the find-my-way router. This modernization reduces dependencies and gives more control over HTTP handling while maintaining the same API surface.

Key changes:

  • Replaced Polka with native http.createServer() and find-my-way router
  • Updated all endpoint handlers to use native IncomingMessage/ServerResponse types
  • Created new send() utility to standardize response handling
  • Migrated and improved bodyParser using native stream consumers
  • Consolidated middleware logic directly into the main server setup

Reviewed changes

Copilot reviewed 25 out of 25 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
workspaces/server/src/index.ts Replaces Polka with native HTTP server, integrates find-my-way router and sirv for static files
workspaces/server/src/endpoints/index.ts New file that sets up find-my-way router with all API routes
workspaces/server/src/endpoints/util/send.ts New response utility replacing @polka/send-type with better API design
workspaces/server/src/endpoints/util/bodyParser.ts Migrated body parser using native stream consumers
workspaces/server/src/endpoints/*.ts Updated all endpoint handlers to use native HTTP types and new parameter passing
workspaces/server/src/ALS.ts Moved type definitions from deleted middleware files
workspaces/server/src/middlewares/*.ts Removed middleware files, functionality integrated into main server
workspaces/server/test/httpServer.test.ts Updated tests for native HTTP server API
workspaces/server/test/bodyParser.test.ts Updated import path and added describe block
workspaces/server/package.json Removed Polka dependencies, added find-my-way
workspaces/server/README.md Updated parameter names from pkgName to packageName
src/commands/http.js Updated to use native HTTP server API
test/helpers/utils.js Updated parameter name for consistency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@fraxken fraxken force-pushed the refactor-http-server branch from 1336d4d to 344df6a Compare December 1, 2025 14:49
Update workspaces/server/src/endpoints/report.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

Update workspaces/server/src/endpoints/util/send.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

chore: fix review
@fraxken fraxken force-pushed the refactor-http-server branch from 344df6a to e199e49 Compare December 1, 2025 18:28
@fraxken fraxken merged commit 6e1b99e into master Dec 1, 2025
11 checks passed
@fraxken fraxken deleted the refactor-http-server branch December 1, 2025 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants