-
Notifications
You must be signed in to change notification settings - Fork 49
refactor(server): remove polka and use find-my-way + native HTTP #622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e3c48bc to
6fa3f5f
Compare
There was a problem hiding this 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/ServerResponsetypes - Created new
send()utility to standardize response handling - Migrated and improved
bodyParserusing 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.
1336d4d to
344df6a
Compare
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
344df6a to
e199e49
Compare
No description provided.