Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/safakb/appwrite-dummy-data
This package allows you to automatically add millions of data data to Appwrite. It is not ultra-fast, it inserts like real data.
https://github.com/safakb/appwrite-dummy-data
appwrite nodejs realtime
Last synced: 21 days ago
JSON representation
This package allows you to automatically add millions of data data to Appwrite. It is not ultra-fast, it inserts like real data.
- Host: GitHub
- URL: https://github.com/safakb/appwrite-dummy-data
- Owner: SafakB
- Created: 2024-02-05T07:46:03.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-05-01T15:49:28.000Z (6 months ago)
- Last Synced: 2024-05-02T10:36:15.346Z (6 months ago)
- Topics: appwrite, nodejs, realtime
- Language: JavaScript
- Homepage:
- Size: 29.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Appwrite Dummy Data
This package allows you to automatically add **millions** of data data to Appwrite. It is not ultra-fast, it inserts like real data.
## Important
> Don't forget to set _APP_OPTIONS_ABUSE=disabled for limitations such as reading and writing data. This setting is in the .env file
```
_APP_OPTIONS_ABUSE=disabled
```> After editing the .env file, you need to recreate the containers.
```sh
docker-compose up -d
```### Setup your client
You should enter your endpoint and project IDs according to your own server information
```js
client
.setEndpoint('https://localhost/v1') // Appwrite server endpoint
.setProject('XXXXXXXXXXXXXXX'); // Project ID
```### Record Count
You can specify how many records to add
```js
const count = 250000;
```### Schema
Remember to set your data schema inside the loop. You should set it according to your own collection
```js
...
let dummyData =
{
title: "Example Name " + i,
description: "Example Description" + i,
content: "Example Content" + i,
enabled: i % 2 == 0 ? true : false,
};
...
```
### Finally edit
And finally add your databaseId and collectionId information here```js
...
database.createDocument('XXXXXXXXXXXXXXX', 'XXXXXXXXXXXXXXXX', 'unique()', dummyData)
...
```### Now you can run the script
```ssh
npm install appwrite
npm run start
```