Skip to main content

Quickstart

Register @quik/http-express alongside @quik/http in your bootstrap module list; the module wires up the Express engine as the active IQHTTPEngine feature automatically:

import { Module as HttpExpress } from '@quik/http-express';

await HttpExpress.setup({ /* bootstrap options */ });

Define a route using the shared @quik/http decorators — routes are engine-agnostic, @quik/http-express only supplies the runtime that executes them:

import { Decorators, QRoute } from '@quik/http';

@Decorators.Route.Route('/health')
export class HealthRoute extends QRoute {
@Decorators.Endpoint.GET('/')
async get() {
return { status: 'ok' };
}
}

Notes

  • @quik/http must be installed and loaded before @quik/http-express (declared as a Dependencies entry in module.ts).
  • The module only activates when an IQHTTPEngine feature has not already been set — check hasFeature('IQHTTPEngine') if you need to guard custom setup.
  • Attach Express-specific middleware with ExpressMiddlewareUtils.RouteMiddleware()/.EndpointMiddleware(); these are Express-only and not part of @quik/http's engine-agnostic decorator set.