Skip to content

Express Middleware

Many Express middleware packages work with Shokupan using the compatibility layer.

import { useExpress } from 'shokupan';
import helmet from 'helmet';
app.use(useExpress(helmet()));

For better performance, use native Shokupan plugins:

import { SecurityHeaders, Compression, Cors } from 'shokupan';
app.use(SecurityHeaders());
app.use(Compression());
app.use(Cors());
  • Plugins - Native Shokupan plugins