@adearriba/shopify-app-session-storage-cosmosdb
TypeScript icon, indicating that this package has built-in type declarations

3.1.0 • Public • Published

Session Storage for Cosmosdb - Shopify App

Shopify App Session Storage for Azure Cosmos DB

Create an instance by using withCredentials static method:

const cosmosDBSessionStorage = CosmosDBSessionStorage.withCredentials(
    "endpoint",
    "key",
    "dbName"
);

Optionally, you can use an additional configuration by adding a CosmosDBSessionStorageOptions object that includes the ability to change the container name and add ContainerRequest parameter to pass to Azure CosmosDB container creation. Refer to the Official ContainerRequest Docs

const cosmosDBSessionStorage = CosmosDBSessionStorage.withCredentials(
    "endpoint",
    "key",
    "dbName",
    {
        containerName: "shopify_sessions",
        containerRequest: {
            partitionKey: "/id",
            ...
        },
    }
);

/@adearriba/shopify-app-session-storage-cosmosdb/

    Package Sidebar

    Install

    npm i @adearriba/shopify-app-session-storage-cosmosdb

    Weekly Downloads

    4

    Version

    3.1.0

    License

    MIT

    Unpacked Size

    32.9 kB

    Total Files

    13

    Last publish

    Collaborators

    • adearriba