-
Notifications
You must be signed in to change notification settings - Fork 0
Getting Started with Adapters
While having a caching system in memory is great and useful to have, the ability to link our API to a database is where k-value
really shines. You can target specific adapters that will automatically create and link your stored information to an internal database table, supplied you give k-value
credentials of course. This will allow you to share information between sessions or even between multiple applications entirely.
Enabling specific adapters is as simple as just installing their respective peer dependencies. You can find your adapter in the list below to find the required peer dependencies for the adapter you wish to use.
-
MemoryAdapter
- None
-
MySQLAdapter
npm install --save mysql2
- MySQL2 on NPM
-
PostgreSQLAdapater
npm install --save pg
- PG on NPM
-
SQLiteAdapter
npm install --save sqlite3
- SQLite3 on NPM
After you install the peer dependencies for your respective adapter, you can visit Code Examples for how to enable and use each adapter individually and snippets of storing both simple and complex objects.