Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/htnabe/algolia-uploader
command-line utils to upload Algolia source
https://github.com/htnabe/algolia-uploader
algolia-search instantsearchjs nodejs typescript
Last synced: about 1 month ago
JSON representation
command-line utils to upload Algolia source
- Host: GitHub
- URL: https://github.com/htnabe/algolia-uploader
- Owner: htnabe
- License: gpl-3.0
- Created: 2024-07-30T22:09:20.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-02T13:35:13.000Z (6 months ago)
- Last Synced: 2024-12-22T08:56:03.084Z (about 1 month ago)
- Topics: algolia-search, instantsearchjs, nodejs, typescript
- Language: JavaScript
- Homepage:
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# algolia-uploader
Command-line util to upload Algolia source.## Example
1. Make `.env` file and set params
```.env
ALGOLIA_APP_ID=1234abcd5768
ALGOLIA_ADMIN_API_KEY=hogehigehuge
ALGOLIA_INDEX_NAME=algoliaIndexName
DATA_DIR=path/to/dir
```2. Make `example.json` to be uploaded to Algolia
```
[
{
"objectID": "prod_001",
"name": "Wireless Headphones",
"brand": "SoundMaster",
"price": 129.99,
"inStock": true,
"rating": 4.5,
"description": "Premium sound quality with noise cancellation.",
"imageUrl": "https://example.com/images/headphones.jpg"
},
{
"objectID": "prod_002",
"name": "Ultra-Slim Laptop",
"brand": "TechPro",
"price": 999.00,
"inStock": true,
"rating": 4.8,
"description": "Sleek design with powerful performance.",
"imageUrl": "https://example.com/images/laptop.jpg"
},
{
"objectID": "prod_003",
"name": "Smart Security Camera",
"brand": "SafeGuard",
"price": 89.99,
"inStock": false,
"rating": 4.2,
"description": "Monitor your home with 1080p video.",
"imageUrl": "https://example.com/images/camera.jpg"
}
]
```Cautions:
- `objectID` is necessary
- For now, only one json file can be loaded, I will support multiple files(maybe)3. Run `npx algolia-uploader` (WIP)
If this library is published, I will try to make it possible to do the following
```
> npx algolia-uploader> Added 3 items
> Updated 2 items
> Deleted 3 items
```