https://github.com/drylikov/algolite
An Implementation of Algolia to emulate its REST API on your local machine or CI environments in order to speed up your development and testing cycles.
https://github.com/drylikov/algolite
Last synced: 10 days ago
JSON representation
An Implementation of Algolia to emulate its REST API on your local machine or CI environments in order to speed up your development and testing cycles.
- Host: GitHub
- URL: https://github.com/drylikov/algolite
- Owner: drylikov
- License: mit
- Created: 2024-06-11T22:04:43.000Z (11 months ago)
- Default Branch: drylikov
- Last Pushed: 2024-06-11T22:05:52.000Z (11 months ago)
- Last Synced: 2025-03-27T14:07:26.415Z (27 days ago)
- Language: JavaScript
- Size: 97.7 KB
- Stars: 3
- Watchers: 4
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Algolite
An Implementation of [Algolia](https://www.algolia.com/) to emulate its REST API on your local machine or CI environments in order to speed up your development and testing cycles.## Installation
```
npm run -g algolite
```## Example
```
$ algolite --helpUsage: algolite [--port ] [--path ]
An Algolia REST API Implementation
Options:
--help Display this help message and exit
--port The port to listen on (default: 9200)
--path The path to use for the LevelDB store (Your project folder)
```Once running any algolia client can be used.
```javascript
const client = algoliasearch('app-id', 'api-key', {
hosts: [{
protocol: 'http',
url: 'localhost:9200'
}]
})const index = client.initIndex('entries');
await index.addObject({
title: 'Algolia 2019',
contentType: 'events'
})const result = await index.search('Algolia')
```## Docker Image
```
docker run --rm -p 9200:9200 --name algolite marconi1992/algolite:0.1.1
```