rsnext/examples/with-redis
Henrik Wenz 92aafcbcf1
[Docs] Add config types to all examples (#40083)
<!--
Thanks for opening a PR! Your contribution is much appreciated.
In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below.
Choose the right checklist for the change that you're making:
-->

## Summary

- Added jsdoc typing for all examples using `next.config.js`
- Added jsdoc typing for all examples using `tailwind.config.js`

## Documentation / Examples

- [x] Make sure the linting passes by running `pnpm lint`
- [x] The examples guidelines are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing.md#adding-examples)
2022-08-31 16:41:22 -05:00
..
lib Convert with-redis example to TypeScript (#34720) 2022-02-23 18:52:57 +00:00
pages Enable @typescript-eslint/no-use-before-define for examples dir (#39469) 2022-08-10 16:30:36 +00:00
public Update Redis example to use Tailwind. (#23131) 2021-03-17 21:11:57 +00:00
styles Update Redis example to use Tailwind. (#23131) 2021-03-17 21:11:57 +00:00
.gitignore Update default gitignore templates (#39051) 2022-07-26 20:08:40 -05:00
next-env.d.ts Convert with-redis example to TypeScript (#34720) 2022-02-23 18:52:57 +00:00
package.json Convert with-redis example to TypeScript (#34720) 2022-02-23 18:52:57 +00:00
postcss.config.js Fix tailwind error with Redis example. (#27042) 2021-07-12 10:35:50 -05:00
README.md Update pnpm create next-app for latest pnpm 6 and 7 (#37254) 2022-05-27 21:21:40 +00:00
tailwind.config.js [Docs] Add config types to all examples (#40083) 2022-08-31 16:41:22 -05:00
tsconfig.json Convert with-redis example to TypeScript (#34720) 2022-02-23 18:52:57 +00:00

Redis Example (with Upstash)

This example showcases how to use Redis as a data store in a Next.js project.

The example is a roadmap voting application where users can enter and vote for feature requests. It features the following:

  • Users can add and upvote items (features in the roadmap)
  • Users can enter their email addresses to be notified about the released items.
  • The API records the ip-addresses of the voters, so it does not allow multiple votes on the same item from the same IP address.

Demo

Deploy Your Own

This examples uses Upstash (Serverless Redis Database) as its data storage. During deployment, you will be asked to connect with Upstash. The integration will help you create a free Redis database and link it to your Vercel project automatically.

Deploy with Vercel

How to use

Execute create-next-app with npm, Yarn, or pnpm to bootstrap the example:

npx create-next-app --example with-redis roadmap
# or
yarn create next-app --example with-redis roadmap
# or
pnpm create next-app --example with-redis roadmap

Deploy it to the cloud with Vercel (Documentation).