Skip to content

Connection error with Deno.openKv #114

@devzucca

Description

@devzucca

Hi, how are you? I have a question about connecting to Deno.openKv. If I run Docker, each Docker creates a separate DB. However, if I want to run three DenoKv DBs with Docker, there's only one env for each DB. If I want to run multiple DBs in a project, how would I connect? If I do it this way:

const db1 = await Deno.openKv(http://${uri}:${port}, {
accessToken: accessToken1
});

const db2 = await Deno.openKv(http://${uri}:${port}, {
accessToken: accessToken2
});

The connection is only recognized if I run:

Deno.env.set("DENO_KV_ACCESS_TOKEN", accessToken);

If I pass the token directly, I haven't been able to connect to the DB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions