A plugin for the Elysia web framework that allows using Express/Connect middleware directly. Version 0.0.6, active development with frequent releases. It bridges Elysia's request/response objects to the Connect interface, enabling reuse of middleware like passport, cors, compression, and session. Key differentiators: lightweight, preserves Elysia's performance, and supports seamless integration without modifying existing middleware. Requires Elysia ^1.3.1.
npm install elysia-connect-middlewareVerified import paths — ran on the pinned version, not inferred.
Shows basic setup: import Elysia and the plugin, apply middleware, and start server.
Test middleware compatibility; prefer middleware that works with standard request/response objects.
Access Express properties via the request object, but be aware of potential overrides.
Update to latest version and use the current import syntax.
Always pass middleware functions wrapped in an array: .use(connectMiddleware([cors(), compression()]))
Use ESM import: import { connectMiddleware } from 'elysia-connect-middleware'Ensure you use .use(connectMiddleware()) before any middleware that relies on query parsing.
Run npm install elysia-connect-middleware, and import correctly.