Add public data
Use the dexie-cloud CLI to import data into the public realm as follows:
- Use npx dexie-cloud databases to verify you are connected to the correct DB. If not, use npx dexie-cloud connect to connect to it. If you have no DB, use npx dexie-cloud create to create one.
- Create a JSON file (let’s name it “publicData.json”):
{ "data": { "rlm-public": { "products": { "prd1": { "price": 60, "title": "Black T-shirt, size M", "description": "A nice black T-shirt (medium)" }, "prd2": { "price": 70, "title": "Blue Jeans", "description": "Plain blue jeans" } } } } }
- Import the file
npx dexie-cloud import publicData.json
List current public data
npx dexie-cloud export --data --realmId rlm-public existingData.json
more existingData.json
How to delete, update or manage data using the CLI
See cli#import
Dexie Cloud Docs
- Access Control in Dexie Cloud
- Add demo users
- Add public data
- Authentication in Dexie Cloud
- Consistency in Dexie Cloud
- DBPermissionSet
- Dexie Cloud API
- Dexie Cloud CLI
- Dexie Cloud Docs
- Dexie Cloud REST API
- DexieCloudOptions
- Invite
- Limits
- Member
- PersistedSyncState
- Purchase Subscription
- Realm
- Role
- Run Dexie Cloud on Own Servers
- Sharding and Scalability
- SyncState
- UserLogin
- db.cloud.configure()
- db.cloud.currentUser
- db.cloud.currentUserId
- db.cloud.events.syncComplete
- db.cloud.invites
- db.cloud.login()
- db.cloud.logout()
- db.cloud.options
- db.cloud.permissions()
- db.cloud.persistedSyncState
- db.cloud.roles
- db.cloud.schema
- db.cloud.sync()
- db.cloud.syncState
- db.cloud.userInteraction
- db.cloud.usingServiceWorker
- db.cloud.version
- db.cloud.webSocketStatus
- db.members
- db.realms
- db.roles
- dexie-cloud-addon