REST API plugin for Waibu Web Framework, built on Fastify. Version 2.12.0 provides a modular RESTful API layer requiring waibu, waibu-db, and bajo-extra as peer dependencies. It integrates tightly with the Bajo ecosystem, offering configuration-driven API endpoints with automatic database binding. Release cadence is irregular; maintained by Ardhi. Differentiator: part of the Bajo framework stack, enabling rapid API development with minimal boilerplate.
npm install waibu-rest-apiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a WaibuRestApi instance with auto-generated routes from database schemas and starts the server.
Convert your project to ESM (use 'import' statements, set 'type': 'module' in package.json, or use dynamic import().
Set routes: 'auto' to auto-generate from database schemas.
Provide a connection string (e.g., 'sqlite://:memory:') or set DB_CONNECTION in environment.
Replace addRoute(routeConfig) with registerRoute(routeConfig).
Rename 'port' to 'listenPort' in configuration.
Use import statement or dynamic import().
Ensure all required options (prefix, routes, db) are provided.
Run 'npm install waibu-db'.