rauchg / blog

https://rauchg.com
1.24k stars 175 forks source link

Refactor redis #162

Closed jasonLaster closed 2 weeks ago

jasonLaster commented 6 months ago

This is a small dx change that makes it easier to get started.

The first thing you'll see is that all redis functions are moved to redis.ts which provides a public api which supports not having access to redis. This is a small thing, but if someone tries to clone and run the blog locally, it's marginally nicer for it to work the first time.

The second thing is a feature flag (NEXT_PUBLIC_ENABLE_PAGE_VIEWS) for enabling incrementing page views locally. This makes it easier to test incrementing page view logic locally without accidentally shipping commented out code.

https://replay.run/OAjMlT5 https://www.loom.com/share/6b9838e0f6aa45c29da61379e83ee290

vercel[bot] commented 6 months ago

@jasonLaster is attempting to deploy a commit to the Guillermo Rauch Team on Vercel.

A member of the Team first needs to authorize it.