Registry / testing / plumier

plumier

JSON →
library1.1.3jsnpmunverified

Plumier is a delightful Node.js REST framework built with TypeScript, currently at version 1.1.3 (latest stable). It follows an MVC pattern with decorators for routing, dependency injection, and OpenAPI integration. Unlike Express or Koa, Plumier provides a full-featured framework with automatic validation, reflection, and Swagger documentation generation. It uses Koa internally for HTTP handling and supports TDD. Release cadence is moderate with a focus on stability.

npm install plumier
INSTALL
IMPORT
SIG · PLUMIER
P
plumier
testingjavascriptv1.1.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Plumier
import { Plumier } from 'plumier'
const Plumier = require('plumier')
ESM-only package; CommonJS require will fail
route
import { route } from 'plumier'
import { Route } from 'plumier'
route is a lowercase named export, not uppercase
bind
import { bind } from 'plumier'
import { bind } from 'plumier/decorators'
bind is exported from the main package, no subpath needed

Creates a simple REST API with a single GET endpoint returning JSON

import { Plumier, route } from 'plumier' import { KoaAdapter } from 'plumier/adapters/koa' class HelloController { @route.get("hello") hello() { return { message: "Hello World" } } } const plumier = new Plumier() plumier.set(new KoaAdapter(), HelloController) plumier.start(8000) .then(() => console.log("Server running on http://localhost:8000"))
Debug
Known issues
breakingPlumier v1.0 dropped support for CommonJS; all imports must use ESM syntax.
fix
Use import instead of require; ensure package.json has \"type\": \"module\" or use .mjs extension.
affects: >=1.0.0
breakingPlumier v1.0 changed adapter interfaces; KoaAdapter is now required instead of direct Koa server creation.
fix
Import KoaAdapter from 'plumier/adapters/koa' and pass it to Plumier.set().
affects: >=1.0.0
deprecatedThe @bind() decorator for parameter injection is deprecated in v1.0; use plain parameters with types.
fix
Remove @bind() decorators; TypeScript reflection will infer binding.
affects: >=1.0.0
gotchaPlumier uses decorators which require TypeScript's experimentalDecorators and emitDecoratorMetadata to be enabled.
fix
Set \"experimentalDecorators\": true and \"emitDecoratorMetadata\": true in tsconfig.json.
affects: >=0.0.0
gotchaPlumier's route decorator argument expects a path without leading slash; leading slashes cause unexpected behavior.
fix
Use @route.get('hello') not @route.get('/hello').
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'plumier'
Plumier is ESM-only and Node.js may not resolve it properly without type: module.
fix
Add \"type\": \"module\" to your package.json or rename file to .mjs.
Reflect.metadata is not a function
reflect-metadata polyfill is missing.
fix
Install reflect-metadata: npm install reflect-metadata and import it at the top of your entry file: import 'reflect-metadata'.
Decorators are not allowed here
TypeScript experimentalDecorators option not enabled.
fix
Set \"experimentalDecorators\": true in tsconfig.json.
Upgrade
Version history
1.1.3latest on npm
Audit
Dependencies
koarequiredHTTP server framework used internally
Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
plumier — npm install plumier · libregistry