From 2f0439df3b8ee5d847fe125814a6dc985280d587 Mon Sep 17 00:00:00 2001 From: James Williams Date: Sat, 23 Nov 2024 21:39:13 +0000 Subject: [PATCH] Allowed twitch clip downloader to run for now --- census/README.md | 14 +++++++------- census/api/src/services/twitch/utils.ts | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/census/README.md b/census/README.md index c8bd47b..f3892c1 100644 --- a/census/README.md +++ b/census/README.md @@ -20,19 +20,19 @@ This is the secret that the API uses to sign the JWTs. For local development, you can stick to the default value but know that it makes the token insecure. If you want to generate a new secret, you can run `pnpm --filter=@alveusgg/census-api setup:jwt` to generate a new secret. +## Seeding the database + +You will need to seed the database with the correct data. To add yourself as an admin, run `pnpm --filter=@alveusgg/census-api setup:api` and follow the prompts. + ## Running the services -1. Start the database. - - In the root of the repo, run `docker compose up`. +1. Start the local services, the database, cache & blob storage. + - In the root of the repo, run `pnpm run deps:up`. 2. Start the API. - `pnpm --filter=@alveusgg/census-api start`. - `pnpm --filter=@alveusgg/census-api dev` to start in watch mode. 3. Start the UI. - - `pnpm --filter=@alveusgg/census-website start`. - -## Seeding the database - -You will need to seed the database with the correct data. To add yourself as an admin, run `pnpm --filter=@alveusgg/census-api setup:api` and follow the prompts. + - `pnpm --filter=@alveusgg/census-website start`. This is always started in watch mode. ## Optional & additional setup diff --git a/census/api/src/services/twitch/utils.ts b/census/api/src/services/twitch/utils.ts index 9ec8062..4d2e7b4 100644 --- a/census/api/src/services/twitch/utils.ts +++ b/census/api/src/services/twitch/utils.ts @@ -117,8 +117,9 @@ const runBinary = async (args: string[]) => { export const runTwitchDownloader = async (args: string[]) => { const { variables } = useEnvironment(); if (variables.NODE_ENV !== 'development') { - throw new Error('TwitchDownloaderCLI is not available in production'); + console.warn('TwitchDownloaderCLI will not be available in production'); } + const hasBinary = await checkForBinary(); if (!hasBinary) { await downloadBinary();