Home

Awesome

<p align="center"> <img src="public/images/logo-light-mode.svg" alt="MeiliSearch logo" width="200" height="200" /> </p> <h1 align="center">Where to Watch</h1> <h4 align="center"> <a href="https://github.com/meilisearch/MeiliSearch">MeiliSearch</a> | <a href="https://docs.meilisearch.com">Documentation</a> | <a href="https://slack.meilisearch.com">Slack</a> | <a href="https://www.meilisearch.com">Website</a> | <a href="https://docs.meilisearch.com/faq">FAQ</a> </h4> <p align="center"> <a href="https://github.com/meilisearch/demo-movies/blob/main/LICENCE"><img src="https://img.shields.io/badge/license-MIT-informational" alt="License"></a> </p> <br/> <p align="center" style="font-weight:bold;" >Where to Watch</p>

Table of Contents:

<br/>

Setup

Install dependencies

yarn

Run Meilisearch

You can run a Meilisearch instance locally with the following command:

docker run -it --rm \
    -p 7700:7700 \
    getmeili/meilisearch:v1.7 \
    meilisearch --env="development"

Import movies

Run the following script in order to create the different indexes and upload the movies documents:

You need to run at least once this command to create the correct indexing settings: yarn setup:settings

Then run the setup to index the data: yarn setup

Run

yarn dev

Go to http://localhost:3000/ and enjoy ! 🎉

Build

Generate build

You can generate a build of this project with the following command:

yarn build

Run your build

The above commands will generate an optimized version of the app, inside the .next folder.

You can then serve it with:

yarn start

Or serve it with any web server of your choice.

Example:

serve .next

Environment variables

To connect to your own Meilisearch instance, two environment variables should be provided:

An example can be found in the .env.example file. You can either rename this file into .env, or create a new file.

Compatibility with Meilisearch

This demo only guarantees the compatibility with the version v1.6 of Meilisearch.

Storybook

Storybook is a development environment for UI components. It allows you to browse a component library, view the different states of each component, and interactively test components.

yarn storybook

Testing

Tests are implemented using Cypress. To run the tests, first launch a Meilisearch instance, then run:

yarn test

Environment variables

Environment variables are configured in cypress.config.js:

const { defineConfig } = require('cypress')

module.exports = defineConfig({
  // ...
  env: {
      MEILISEARCH_HOST: 'http://0.0.0.0:7700',
      MEILISEARCH_API_KEY: 'masterKey',
    }
}