ark-database is a wrapper library designed for database access, specifically tailored for the `locator-kn/ark` application server. As of version 18.3.0, the package is deeply integrated into the `ark` ecosystem and requires `hapi` (>=9.x.x) as a peer dependency. The project appears to be abandoned, with its last commit in October 2017, and an open GitHub issue (dating back to 2016) indicates an unfinished transition from callback-based APIs to Promises. This leads to an inconsistent API surface where developers might encounter a mix of both patterns, necessitating direct source code inspection for clarity. Given its abandonment and tight coupling to an unmaintained server framework, it is not recommended for new projects. Its release cadence was irregular, with significant periods of inactivity.
npm install ark-databaseVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the core usage of `ark-database` including initialization and performing basic CRUD operations (get, create, delete) using its callback-based API.
Migrate to a currently maintained database abstraction layer or ORM. This package is unsuitable for new development or production environments.
Always check the source code for the specific method's signature or assume a callback API. Wrap callback-based methods in Promises manually if Promise-based usage is desired (e.g., using `util.promisify`).
Ensure your project explicitly installs a compatible Hapi version. However, given Hapi's evolution and this package's abandonment, finding a compatible and secure Hapi version for modern Node.js may be challenging.
Run `npm install ark-database` to add it to your project's dependencies.
Install a compatible version of Hapi: `npm install hapi@^9.0.0`. Note that Hapi v9 is very old and potentially insecure for modern applications.
Verify the exact method name and its expected arguments (callback or Promise return) by consulting the library's source code, as documentation may be incomplete or outdated.