https://github.com/hdoro/strapi-mux-test
https://github.com/hdoro/strapi-mux-test
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/hdoro/strapi-mux-test
- Owner: hdoro
- Created: 2024-02-29T12:42:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-15T17:40:08.000Z (about 1 year ago)
- Last Synced: 2024-05-01T16:52:44.993Z (about 1 year ago)
- Language: JavaScript
- Size: 167 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Repository for testing strapi-plugin-mux-video-uploader
1. `cd strapi-plugin-mux-video-uploader && yarn install && yarn dev`
1. In a separate terminal: `cd strapi-test-project && yarn install && yarn dev`
1. Open strapi and start developing**Note:** you'll need to restart the strapi-test-project server after making changes to the plugin. [Strapi's documentation on hot module reloading of plugins](https://docs.strapi.io/dev-docs/plugins/development/create-a-plugin#servers-and-hot-reloading) is lacking and we couldn't make it work.
## Handling webhooks
Find a way of tunneling requests to your Strapi instance running on `http://localhost:1337` - it should be a service that supports GET requests and domain-level aliasing, like [ngrok](https://ngrok.com/) or [telebit](https://telebit.cloud). [smee](https://smee.io/) and similar alternatives don't work because they operate on a sub-path basis (e.g. `https://smee.io/BWLGc3BHYSm6RgsA`), which doesn't handle the different endpoints we need Mux to have access to.
With the tunneling domain & URL in hands (e.g. `https://felicious-sought-wasp.ngrok-free.app`), set Mux to send webhooks to it by using the Webhooks dashboard of the chosen environment. Also, temporarily update `BASE_URL` in `strapi-plugin-mux-video-uploader/server/utils/text-tracks.ts` to match the tunneling domain.
## How it works
We configure the test project to use the local plugin via `strapi-test-project/config/plugins.js`. There, we point to the relative path of the plugin's dist directory, which is updated by its own `dev` script.