You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current setup for how our Redis (AKA Vercel KV) is that a key is set solely by its name. This name does not change between development / preview environments. For example, a key setting function currently looks await kv.sadd("config:navitemslist", encodeURIComponent(name)).
Because of this, the current set up requires anyone who wishes to use Hackkit to have two separate instances: one for development and one for production. This creates a more difficult developer experience especially for those on free plans. This issue can easily be solved by prepending an environment variable that changes between environments to keep all of the keys in one database.
Requirements
Create an environment variable called HK_ENV that allows for it to be set to "development" or "production" depending on the environment.
Ensure this ENV is a part of the turbo.json under the globalEnv value so people using Hackkit will know that it is a required key
Append the key to the redis calls so it will look something like the following
Notice that there is also an underscore that separates the env value from the key itself. The underscore was arbitrary and could also be something like a '-'. Up to developer discretion.
The text was updated successfully, but these errors were encountered:
Description
await kv.sadd("config:navitemslist", encodeURIComponent(name))
.Requirements
HK_ENV
that allows for it to be set to "development" or "production" depending on the environment.Notice that there is also an underscore that separates the env value from the key itself. The underscore was arbitrary and could also be something like a '-'. Up to developer discretion.
The text was updated successfully, but these errors were encountered: