Registry / web-framework / wappi
library3.4.8jsnpmunverified

WAPPI is a Node.js microservice API framework that provides a plain and practical interface for building APIs with built-in Prisma ORM integration, request validation, and automatic OpenAPI documentation. Current stable version is 3.4.8. Development is active, with regular releases. Key differentiators: zero-config Prisma integration, automatic route documentation via OpenAPI, and a plugin system for extending functionality. It simplifies building microservices by reducing boilerplate and enforcing structure.

npm install wappi
INSTALL
IMPORT
SIG · WAPPI
W
wappi
web-frameworkjavascriptv3.4.8
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

Wappi
import { Wappi } from 'wappi'
const Wappi = require('wappi')
ESM-only since v3. For CommonJS, use dynamic import: const { Wappi } = await import('wappi');
endpoint
import { endpoint } from 'wappi'
import endpoint from 'wappi'
Named export, not default. For TypeScript, ensure esModuleInterop is enabled.
WappiRequest
import type { WappiRequest } from 'wappi'
import { WappiRequest } from 'wappi' (if only used as type)
Use type-only import for TypeScript to avoid runtime overhead. Available since v3.4.0.

Shows initializing WAPPI with SQLite database, defining a simple GET endpoint with a path parameter, and starting the server.

import { Wappi, endpoint, param, body, response } from 'wappi' const app = new Wappi({ database: { provider: 'sqlite', url: 'file:./dev.db' } }) const helloEndpoint = endpoint({ method: 'GET', path: '/hello/:name', handler: ({ name }) => `Hello, ${name}!` }) app.addEndpoint(helloEndpoint) app.start(3000).then(() => console.log('Server running on http://localhost:3000'))
Debug
Known issues
breakingWAPPI v3 drops CommonJS support; require() will throw an error.
fix
Use ESM imports or dynamic import().
affects: >=3.0.0
deprecatedThe `usePrisma` method is deprecated in favor of setting Prisma in the constructor config.
fix
Pass `prisma` option in the Wappi constructor config object.
affects: >=3.2.0
gotchaWhen using TypeScript, ensure `esModuleInterop` is true in tsconfig.json to avoid import issues.
fix
Add `"esModuleInterop": true` to tsconfig.json compilerOptions.
affects: >=3.0.0
gotchaWAPPI generates OpenAPI spec based on endpoint decorators; missing `response` decorator can cause missing response schemas.
fix
Always annotate endpoints with `response({ status: 200, schema: ... })` for full documentation.
affects: all
gotchaPath parameters must be prefixed with colon (e.g., `/user/:id`); using curly braces `{id}` will not match.
fix
Use colon syntax for path parameters.
affects: all
Errors
Common errors & fixes
SyntaxError: Cannot use import statement outside a module
Attempting to use ESM import in a CommonJS Node.js project without proper configuration.
fix
Add `"type": "module"` in package.json or rename file to .mjs.
Error: Cannot find module 'prisma'
Prisma package not installed or not in node_modules.
fix
Run `npm install prisma` as a dependency.
TypeError: app.addEndpoint is not a function
Using an older version of WAPPI where addEndpoint was named addRoute or similar.
fix
Check WAPPI version; upgrade to v3+ and use addEndpoint method.
Upgrade
Version history
3.4.8latest on npm
Audit
Dependencies
prismarequiredRequired for database access and schema management; WAPPI integrates deeply with Prisma ORM.
@prisma/clientrequiredRuntime Prisma client used by WAPPI for database queries.
Agent activity
21 hits · last 30 days
node
18
Meta
1
OpenAI (training)
1
Resources
wappi — npm install wappi · libregistry