Skip to content

Commit

Permalink
chore: updates contributing.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ixahmedxi committed Nov 3, 2023
1 parent d292e24 commit e047f47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In this guide, you will get an overview of the project structure and setup, as w
- [Environment Variables](#environment-variables)
- [Configuring your Database](#configuring-your-database)
- [Configuring Clerk](#configuring-clerk)
- [Configuring Upstash](#configuring-upstash)
- [Configuring Upstash (optional)](#configuring-upstash-optional)
- [Running stuff](#running-stuff)
- [Closing notes](#closing-notes)

Expand Down Expand Up @@ -171,6 +171,8 @@ And now you got Auth!

#### Configuring Upstash (optional)

> **Note** Upstash is used to provide rate-limiting capabilities to Noodle, which is optional locally as that it's really only needed in the production version.
1. Create your account through [Upstash's dashboard](https://console.upstash.com)
2. Click on "Create database"
3. Give it a name and a region
Expand All @@ -179,7 +181,6 @@ And now you got Auth!
6. In the "Connect to your database" section, select "@upstash/redis"
7. Copy the url into your `.env` file as `REDIS_URL` key
8. Copy the token into your `.env` file as `REDIS_TOKEN` key
9. Upstash is only used for ratelimiting, if left empty then ratelimiting will be disabled

And that's all for the redis part!

Expand Down
4 changes: 2 additions & 2 deletions src/env.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export const env = createEnv({
NODE_ENV: z
.enum(["development", "test", "production"])
.default("development"),
UPSTASH_REDIS_REST_URL: z.string().min(1).optional(),
UPSTASH_REDIS_REST_TOKEN: z.string().min(0).optional(),
UPSTASH_REDIS_REST_URL: z.string().optional(),
UPSTASH_REDIS_REST_TOKEN: z.string().optional(),
CLERK_SECRET_KEY: z.string().min(1),
OPENWEATHER_API_KEY: z.string().min(1),
},
Expand Down

0 comments on commit e047f47

Please sign in to comment.