Deepkit HTTP supports most of the Express middlewares. To use an Express middleware in Deepkit HTTP, you can simply import it from the respective package and use it with httpMiddleware.for()
.
Here's an example of using the compression
middleware:
import * as compression from 'compression'; import { httpMiddleware } from '@deepkit/http'; // ... new App({ // ... middlewares: [ httpMiddleware.for(compression()), ], // ... }).run();
You can use any other Express middleware in a similar way.