From 1f3eb459c435fff3f2e2f73661ba4d6ed20495ac Mon Sep 17 00:00:00 2001 From: Eric Allam Date: Tue, 14 Feb 2023 16:37:19 +0000 Subject: [PATCH] Added runLocalDocs for templates --- .../migration.sql | 4 +++ apps/webapp/prisma/schema.prisma | 1 + apps/webapp/prisma/seed.ts | 1 + templates/docs/basic-starter-local.md | 27 +++++++++++++++++++ 4 files changed, 33 insertions(+) create mode 100644 apps/webapp/prisma/migrations/20230214163434_add_run_local_docs_to_templates/migration.sql create mode 100644 templates/docs/basic-starter-local.md diff --git a/apps/webapp/prisma/migrations/20230214163434_add_run_local_docs_to_templates/migration.sql b/apps/webapp/prisma/migrations/20230214163434_add_run_local_docs_to_templates/migration.sql new file mode 100644 index 000000000..c3bbf93c8 --- /dev/null +++ b/apps/webapp/prisma/migrations/20230214163434_add_run_local_docs_to_templates/migration.sql @@ -0,0 +1,4 @@ +-- AlterTable +ALTER TABLE "Template" ADD COLUMN "runLocalDocs" TEXT NOT NULL DEFAULT 'Documentation + +This template does not have any documentation yet.'; diff --git a/apps/webapp/prisma/schema.prisma b/apps/webapp/prisma/schema.prisma index 042e44d39..07578e806 100644 --- a/apps/webapp/prisma/schema.prisma +++ b/apps/webapp/prisma/schema.prisma @@ -601,6 +601,7 @@ model Template { imageUrl String repositoryUrl String markdownDocs String @default("Documentation\n\nThis template does not have any documentation yet.") + runLocalDocs String @default("Documentation\n\nThis template does not have any documentation yet.") priority Int @default(0) diff --git a/apps/webapp/prisma/seed.ts b/apps/webapp/prisma/seed.ts index 5ba609f65..4408dac9b 100644 --- a/apps/webapp/prisma/seed.ts +++ b/apps/webapp/prisma/seed.ts @@ -26,6 +26,7 @@ async function seed() { services: [], workflowIds: ["basic-starter"], markdownDocs: await readTemplateDocsFile("basic-starter"), + runLocalDocs: await readTemplateDocsFile("basic-starter-local"), }; const githubStarsToSlack = { diff --git a/templates/docs/basic-starter-local.md b/templates/docs/basic-starter-local.md new file mode 100644 index 000000000..7216948db --- /dev/null +++ b/templates/docs/basic-starter-local.md @@ -0,0 +1,27 @@ +## Run locally + +First, clone the repo and install dependencies: + +```sh +git clone https://github.com/triggerdotdev/basic-starter.git +cd basic-starter +npm install +``` + +Then create a `.env` file with your development Trigger.dev API Key: + +```sh +echo "TRIGGER_API_KEY=" >> .env +``` + +And finally you are ready to run the process: + +```sh +npm run dev +``` + +You should see a message like the following: + +``` +[trigger.dev] ✨ Connected and listening for events [basic-starter] +```