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

2.1.5 • 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",
            ...
        },
    }
);

Package Sidebar

Install

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

Weekly Downloads

16

Version

2.1.5

License

MIT

Unpacked Size

25.4 kB

Total Files

13

Last publish

Collaborators

  • adearriba