loadStoreFromStorage
The loadStoreFromStorage
function returns the content of a Store
from durable PartyKit storage.
loadStoreFromStorage(
storage: Storage,
storagePrefix?: string,
): Promise<Content>
Type | Description | |
---|---|---|
storage | Storage | A reference to the storage object, as would normally be accessible from the |
storagePrefix? | string | An optional prefix used before all the keys in the server's durable storage, to match the equivalent property in the server's |
returns | Promise<Content> |
This is intended for specialist applications that require the ability to inspect or load a TinyBase Store
from a server's storage outside of the normal context of a TinyBasePartyKitServer
.
The function is asynchronous, so you should use the await
keyword or handle the result as a promise.
Since
v4.4.1