Adonis AlgoliaSearch
This package is a wrapper on top of algoliasearch-client-javascript.
Getting Started
Install the package using the adonis
CLI.
> adonis install adonis-algoliasearch
Follow instructions that are displayed (or read them here).
Configure
Register the provider in start/app.js
:
const providers = ... 'adonis-algoliasearch/providers/AlgoliaSearchProvider'
Add a configuration file in config/algolia.js
. For example:
'use strict' const Env = moduleexports = id: Env index: Env apiKey: Env
Usage
const AlgoliaSearch = const index = AlgoliaSearchindex'projects'
The index returned is the client.initIndex
of algoliasearch
, you have then access to all methods.
Thanks
Special thanks to the creator(s) of AdonisJS for creating such a great framework.