Add default values to Instant Meilisearch's client
mdubus opened this issue · 3 comments
Description
The Interactive Search component on the homepage allows us to display and search inside movies:
To do so, we use Instant Meilisearch. The client needs to be initialized with a host and an apiKey (NEXT_PUBLIC_DEMO_MOVIES_HOST
and NEXT_PUBLIC_DEMO_MOVIES_API_KEY
).
By running the website locally, these environment variables are loaded thanks to a .env
file, but if they are not provided, the website crashes on yarn dev
:
We should provide a default value to these environment variables. I suggest http://0.0.0.0:7700
as a host, and searchKey
for the apiKey.
The changes should be made inside the src/components/InteractiveSearch.js
component, inside the .env.example
, and also inside the src/stories/Searchbox.stories.js
file as well.