Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vercel/algolite
An Implementation of Algolia to emulate its REST API
https://github.com/vercel/algolite
Last synced: 3 months ago
JSON representation
An Implementation of Algolia to emulate its REST API
- Host: GitHub
- URL: https://github.com/vercel/algolite
- Owner: vercel
- Fork: true (marconi1992/algolite)
- Created: 2020-02-20T10:52:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-24T18:21:16.000Z (over 1 year ago)
- Last Synced: 2024-09-18T03:38:00.843Z (4 months ago)
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/algolite
- Size: 162 KB
- Stars: 9
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
```