rsnext/examples/with-fauna
2023-10-11 12:39:25 -05:00
..
actions examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
app examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
components examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
lib examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
public/static Update Fauna example with new guestbook (#27295) 2021-08-02 17:09:04 +00:00
.env.local.example Update Fauna example to create Fauna resources properly (#27757) 2021-08-04 20:37:12 +00:00
.gitignore Remove incorrect entries for pnpm debug log (#47241) 2023-03-26 22:26:05 -07:00
jsconfig.json examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
next.config.js examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
package.json examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
postcss.config.js Update Fauna example with new guestbook (#27295) 2021-08-02 17:09:04 +00:00
README.md examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
tailwind.config.js examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00
tsconfig.json examples: Update Fauna example (#56185) 2023-10-11 12:39:25 -05:00

Fauna Guestbook Starter

This Guestbook Application example shows you how to use Fauna in your Next.js project.

Deploy your own

Deploy the example using Vercel:

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-fauna with-fauna-app
# or
yarn create next-app --example with-fauna with-fauna-app
# or
pnpm create next-app --example with-fauna with-fauna-app

You can start with this template using create-next-app or by downloading the repository manually.

Setting Up Your Fauna Database

Head over to Fauna Dashboard and create a new database. You can name it whatever you want, but for this example, we'll use nextjs-guestbook. Next, create a new collection called Entry in your new database. Finally create a new database access key to connect to your database.

Watch this video to learn how to connect to your database.

Run locally

Install packages, set up if needed, then run the development server:

npm install
npm run dev

Your app should be up and running on http://localhost:3000!