---
title: "Use Deno KV in Node with the new official npm package"
description: "Deno KV is now usable from Node.js through the official @deno/kv npm package, which exposes the same API as Deno's built-in KV through a single openKv function."
url: "https://swe.quest/articles/use-deno-kv-in-node-with-the-new-official-npm-package-b89917dc2e71fbde"
canonical: "https://deno.com/blog/kv-npm"
source: "Deno"
published: "2023-12-12"
difficulty: "medium"
kind: "Announcement"
reading_minutes: 4
tags: ["javascript","databases","serverless"]
---

# Use Deno KV in Node with the new official npm package

A post on [Deno](https://swe.quest/sources/deno.md), published 2023-12-12, 4 min read, Announcement. Original: [https://deno.com/blog/kv-npm](https://deno.com/blog/kv-npm)

## Summary

Deno KV is now usable from Node.js through the official @deno/kv npm package, which exposes the same API as Deno's built-in KV through a single openKv function. That function can connect to a managed Deno Deploy database backed by FoundationDB, a self-hosted denokv server, a local SQLite file, or an in-memory store for tests. Most methods are supported, including atomic, enqueue and watch, but listenQueue does not work against remote databases yet. The package targets Node 18+, has no third-party dependencies, ships platform-specific SQLite binaries built with NAPI-RS from the Rust denokv codebase, and stores values in V8's serialization format.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Databases](https://swe.quest/tags/databases.md) (Data & databases)
- [Serverless](https://swe.quest/tags/serverless.md) (Backend & APIs)

## Prerequisites

- Node.js and npm ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- key-value stores

## Keywords

Deno KV, @deno/kv, Node.js, Deno Deploy, FoundationDB, SQLite, NAPI-RS, denokv

## Related posts

- [Announcing self-hosted Deno KV, continuous backups, and replicas](https://swe.quest/articles/announcing-self-hosted-deno-kv-continuous-backups-and-replicas-81eccdaa35f080ea.md): Deno · 2023-11-10 · Medium · 6 min read · Databases, SQLite, Replication, JavaScript
  Deno KV can now be self-hosted via an open-source, MIT-licensed \`denokv\` binary backed by SQLite and reachable from \`Deno.openKv\` over KV Connect.
- [Deno 1.33: Deno 2 is coming](https://swe.quest/articles/deno-1-33-deno-2-is-coming-2b1565b87f38fa7f.md): Deno · 2023-04-28 · Medium · 8 min read · JavaScript, Runtimes & VMs, TypeScript
  Deno 1.33 ships a built-in, unstable KV database (Deno.openKv) that persists to disk locally and is geo-replicated on Deno Deploy.
- [Announcing Deno KV](https://swe.quest/articles/announcing-deno-kv-d97d28c9a7128cf3.md): Deno · 2023-05-01 · Medium · 5 min read · Databases, Consistency models, Replication, JavaScript
  Deno KV is a strongly consistent key-value database built into the Deno runtime.
- [How to Build a CRUD API with Oak and Deno KV](https://swe.quest/articles/how-to-build-a-crud-api-with-oak-and-deno-kv-91b6dbad01b74ff7.md): Deno · 2023-06-01 · Medium · 9 min read · TypeScript, Databases, API design, Consistency models
  Deno KV, a key-value database built into the Deno runtime, can back a simple CRUD API for users and addresses served by Oak's Router.
- [Introducing KV Backup for Deno Subhosting](https://swe.quest/articles/introducing-kv-backup-for-deno-subhosting-6886c3813b5bf7c0.md): Deno · 2024-07-09 · Medium · 4 min read · Serverless, Databases, JavaScript, Cloud platforms
  Deno Subhosting now supports continuous backup of Deno KV databases to customer-owned S3-compatible object storage, enabling point-in-time recovery.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
