@coloneldev/framework
v1.1.10
Published
Core HTTP and routing runtime for Colonel applications.
Downloads
107
Readme
@coloneldev/framework
Core HTTP and routing runtime for Colonel applications.
Why Developers Pick It
From the runtime user's perspective:
- explicit routing and controller mapping over hidden conventions
- constructor injection that is readable and debuggable
- startup diagnostics for common misconfigurations
- stable 1.x API surface with documented guarantees
See the user-focused overview at https://gwhitdev.github.io/colonel-framework/why-colonel.
Install
bun add @coloneldev/frameworkor
npm install @coloneldev/frameworkExports
The package exports stable framework primitives from the root entry:
KernelRouterHttpRequest- response helpers (
text,html,json,redirect,badRequest,notFound,unprocessableEntity,internalServerError) - error primitives (
HttpException,ValidationError) SessionandInMemorySessionStore- static file helpers (
isStaticPath,toPublicFilePath,contentTypeFor) - telemetry helpers (
TelemetryClient,createTelemetryClientFromEnv) Container
For detailed 1.x stability guarantees, see Stable API Contract.
Example
import { Container, Kernel, Router } from "@coloneldev/framework";
const router = new Router();
const container = new Container();
const kernel = new Kernel(router, [], {}, container);Tests
Run tests from this package directory:
bun run testOr from the repository root:
bun run test:frameworkLicense
MIT
