Koa 1.x wrapper for the mysql npm package (felixge/node-mysql). Current stable version is 1.0.3, last published in 2016. Designed for Koa 1 with generator-based middleware, using co under the hood to yield queries. Not compatible with Koa 2 async/await or modern ESM patterns. Alternatives include mysql2 with promise support or direct use of mysql driver.
npm install koa-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows Koa 1 generator middleware, creating a MySQL pool, yielding a query, and returning the result.
Migrate to mysql2 with promise support and Koa 2 async middleware.
Use require('koa-mysql') instead of import.Use function* and yield, or switch to Koa 2 and mysql2.