Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/meilisearch/demo-movies
Next.js app to find streaming platform to watch movies
https://github.com/meilisearch/demo-movies
meilisearch nextjs nextjs-example react search-engine
Last synced: 3 months ago
JSON representation
Next.js app to find streaming platform to watch movies
- Host: GitHub
- URL: https://github.com/meilisearch/demo-movies
- Owner: meilisearch
- License: mit
- Created: 2021-10-25T08:28:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-09T09:50:38.000Z (4 months ago)
- Last Synced: 2024-07-09T16:36:15.726Z (4 months ago)
- Topics: meilisearch, nextjs, nextjs-example, react, search-engine
- Language: JavaScript
- Homepage: https://where2watch.meilisearch.com/
- Size: 2.15 MB
- Stars: 39
- Watchers: 6
- Forks: 16
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
Awesome Lists containing this project
- awesome-meilisearch - Where To Watch - An application to help you find streaming platforms to watch movies (Demos / Community Tools)
README
Where to Watch
MeiliSearch |
Documentation |
Slack |
Website |
FAQ
Where to Watch
**Table of Contents**:
- [Setup](#setup)
- [Install dependencies](#install-dependencies)
- [Run Meilisearch](#run-meilisearch)
- [Import movies](#import-movies)
- [Run](#run)
- [Build](#build)
- [Generate build](#generate-build)
- [Run your build](#run-your-build)
- [Environment variables](#environment-variables)
- [Compatibility with Meilisearch](#compatibility-with-meilisearch)
- [Storybook](#storybook)
## Setup
### Install dependencies
```bash
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
```bash
yarn dev
```Go to `http://localhost:3000/` and enjoy ! 🎉
## Build
### Generate build
You can generate a build of this project with the following command:
```bash
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:
```bash
yarn start
```Or serve it with any web server of your choice.
Example:
```bash
serve .next
```## Environment variables
To connect to your own Meilisearch instance, two environment variables should be provided:
- `MEILISEARCH_HOST`: the URL of your Meilisearch instance
- `MEILISEARCH_API_KEY`: an API key with at least search rightsAn 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](https://github.com/meilisearch/meilisearch/releases/tag/v1.6.0).
## 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.
```bash
yarn storybook
```## Testing
Tests are implemented using Cypress. To run the tests, first **launch a Meilisearch instance**, then run:
```bash
yarn test
```**Environment variables**
Environment variables are configured in `cypress.config.js`:
```js
const { defineConfig } = require('cypress')module.exports = defineConfig({
// ...
env: {
MEILISEARCH_HOST: 'http://0.0.0.0:7700',
MEILISEARCH_API_KEY: 'masterKey',
}
}
```