Export MySQL databases as RESTful APIs on Koa v1. Stable version 2.1.2. This package is specifically designed for Koa v1 (not v2) and provides automatic CRUD endpoints for MySQL tables with support for pagination, filtering, ordering, complex queries, and custom SQL. It is not actively maintained and relies on outdated dependencies. Key differentiators include built-in hooks, XLS export/import, and VM execution.
npm install datahub-restful-coreNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the RESTful core, mounts it on a Koa v1 app, and starts the server to expose MySQL tables as API endpoints.
Migrate to Koa v2 or use an alternative RESTful API library like feathers.js or loopback.
Use require() instead of import. If using ES modules, use dynamic import() or convert to CommonJS.
Ensure you use koa@1.x, not koa@2+.
Always set a password in the connection options, even if empty, or use environment variables.
Ensure you pass the result of koa() (v1) to mount(), e.g., core.mount(koa()).
Install koa version 1.x: npm install koa@1
Check the connection object: provide correct host, user, password, and database.