From 2a89e52f7ab085b8f0ff17de49fd80aa24a610fe Mon Sep 17 00:00:00 2001 From: Tyler Myracle Date: Sun, 14 Jan 2024 13:46:05 -0600 Subject: [PATCH 1/4] add missing postmark env vars --- .env.example | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index dcf61999..0220d01b 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,6 @@ NX_POLYGON_API_KEY= # If using free ngrok account for webhooks NGROK_AUTH_TOKEN= -POSTMARK_SMTP_PASS= NX_SESSION_SECRET= # Generate a new secret using openssl rand -base64 32 @@ -22,3 +21,9 @@ NX_FINICITY_PARTNER_SECRET= NX_CONVERTKIT_SECRET= NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL= + +# Email credentials +POSTMARK_SMTP_PASS= +NX_POSTMARK_FROM_ADDRESS=account@example.com +NX_POSTMARK_REPLY_TO_ADDRESS=support@example.com +NX_POSTMARK_API_TOKEN= From f5d2c2aabdc9665d393dddb69770ff4c62a88859 Mon Sep 17 00:00:00 2001 From: Tyler Myracle Date: Sun, 14 Jan 2024 13:58:32 -0600 Subject: [PATCH 2/4] update readme with postmark instructions --- .env.example | 1 - README.md | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env.example b/.env.example index 0220d01b..c112c293 100644 --- a/.env.example +++ b/.env.example @@ -23,7 +23,6 @@ NX_CONVERTKIT_SECRET= NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL= # Email credentials -POSTMARK_SMTP_PASS= NX_POSTMARK_FROM_ADDRESS=account@example.com NX_POSTMARK_REPLY_TO_ADDRESS=support@example.com NX_POSTMARK_API_TOKEN= diff --git a/README.md b/README.md index d2e47717..3fb87978 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,8 @@ cp .env.example .env Then, create a new secret using `openssl rand -base64 32` and populate `NEXTAUTH_SECRET` in your `.env` file with it. +To enable transactional emails, you'll need to create a [Postmark](https://postmarkapp.com/) account and add your API key to your `.env` file (`NX_POSTMARK_API_TOKEN`). You can also set the from and reply-to email addresses (`NX_POSTMARK_FROM_ADDRESS` and `NX_POSTMARK_REPLY_TO_ADDRESS`). If you want to run the app without email, you can set `NX_POSTMARK_API_TOKEN` to a dummy value. + Then run the following yarn commands: ``` From a562da7820bcc12a0b7432a5ade680eebf62fb10 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Sun, 14 Jan 2024 20:03:52 -0600 Subject: [PATCH 3/4] Removed NX_SESSION_SECRET No longer used --- .env.example | 2 -- apps/server/src/env.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/.env.example b/.env.example index c112c293..18dc46f9 100644 --- a/.env.example +++ b/.env.example @@ -8,8 +8,6 @@ NX_POLYGON_API_KEY= # If using free ngrok account for webhooks NGROK_AUTH_TOKEN= -NX_SESSION_SECRET= - # Generate a new secret using openssl rand -base64 32 NEXTAUTH_SECRET= NEXTAUTH_URL=http://localhost:4200 diff --git a/apps/server/src/env.ts b/apps/server/src/env.ts index e27169ed..78f12972 100644 --- a/apps/server/src/env.ts +++ b/apps/server/src/env.ts @@ -29,7 +29,6 @@ const envSchema = z.object({ NX_DATABASE_URL: z.string(), NX_DATABASE_SECRET: z.string(), - NX_SESSION_SECRET: z.string(), NX_NGROK_URL: z.string().default('http://localhost:4551'), From 9fcf21e2ccdf459ae48b5587f1aa837192055bc7 Mon Sep 17 00:00:00 2001 From: Josh Pigford Date: Sun, 14 Jan 2024 20:05:16 -0600 Subject: [PATCH 4/4] Removed unused NX_CONVERTKIT_SECRET --- .env.example | 1 - 1 file changed, 1 deletion(-) diff --git a/.env.example b/.env.example index 18dc46f9..7a2105c1 100644 --- a/.env.example +++ b/.env.example @@ -16,7 +16,6 @@ NX_NEXTAUTH_URL=http://localhost:4200 NX_PLAID_SECRET= NX_FINICITY_APP_KEY= NX_FINICITY_PARTNER_SECRET= -NX_CONVERTKIT_SECRET= NEXT_PUBLIC_ZAPIER_FEEDBACK_HOOK_URL=