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.
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