Skip to content

Repository files navigation

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.

Installation

npm run -g algolite

Example

$ algolite --help
Usage: algolite [--port <port>] [--path <path>]
An Algolia REST API Implementation
Options:
--help Display this help message and exit
--port <port> The port to listen on (default: 9200)
--path <path> The path to use for the LevelDB store (Your project folder)

Once running any algolia client can be used.

constclient=algoliasearch('app-id','api-key',{protocol: 'http:',hosts: {read: ['localhost:9200'],write: ['localhost:9200']}})constindex=client.initIndex('entries');awaitindex.addObject({title: 'Algolia 2019',contentType: 'events'})constresult=awaitindex.search('Algolia')

Docker Image

docker run --rm -p 9200:9200 --name algolite marconi1992/algolite:0.1.1

About

An Implementation of Algolia to emulate its REST API

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages