Express Middleware
Many Express middleware packages work with Shokupan using the compatibility adapter.
useExpress Adapter
Section titled “useExpress Adapter”You can use the useExpress adapter to wrap existing Express middleware.
import { Shokupan, useExpress } from 'shokupan';import helmet from 'helmet';
const app = new Shokupan();
// Use Express middlewareapp.use(useExpress(helmet()));
app.listen(3000);Native Alternatives
Section titled “Native Alternatives”For better performance and deeper integration, use native Shokupan plugins when available:
import { Shokupan, SecurityHeaders, Compression, Cors } from 'shokupan';
const app = new Shokupan();
// Native plugins are faster and context-awareapp.use(SecurityHeaders());app.use(Compression());app.use(Cors());
app.listen(3000);Next Steps
Section titled “Next Steps”- Plugins - Native Shokupan plugins