Skip to content

Commit

Permalink
adjust readme
Browse files Browse the repository at this point in the history
  • Loading branch information
atilafassina committed Sep 21, 2022
1 parent 48ce290 commit d208c7d
Showing 1 changed file with 11 additions and 28 deletions.
39 changes: 11 additions & 28 deletions examples/with-xata/README.md
Original file line number Diff line number Diff line change
@@ -1,61 +1,44 @@
<h1> Next.js + Xata Minimal Template <img alt="Xatafly, the logo from Xata" src="/public/flap.gif" width="50" /></h1>
# Next.js + Xata

[![TypeScript](https://badgen.net/badge/icon/typescript?icon=typescript&label)](https://typescriptlang.org)
This example showcases how to use Next.js with [Xata](https://xata.io) as your data layer.

🌎 Check it live at [nextjs-with-xata.vercel.app](https://nextjs-with-xata.vercel.app)
With this template you get out-of-the-box:

- API Route to connect to your Xata database
- Type-safe Codegen
- Accessibility-Ready
- Dark/Light mode
- Respects `prefers-reduce-motion` for CSS Transitions

## How to use
## Demo

[nextjs-with-xata.vercel.app](https://nextjs-with-xata.vercel.app)

### Clone the Example
## How to use

Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init), [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/), or [pnpm](https://pnpm.io) to bootstrap the example:

```sh
npx create-next-app --example https://github.com/xataio/examples/tree/main/apps/nextjs-minimal next-xata-app

npx create-next-app --example cms-contentful cms-contentful-app
```

<details>
<summary> Yarn or PNPM</summary>

```sh
yarn create next-app --example https://github.com/xataio/examples/tree/main/apps/nextjs-minimal next-xata-app
yarn create next-app --example cms-contentful cms-contentful-app
```

```sh
pnpm create next-app --example https://github.com/xataio/examples/tree/main/apps/nextjs-minimal next-xata-app
pnpm create next-app --example cms-contentful cms-contentful-app
```

</details>

### Link Your Xata Workspace and Run Codegen

```sh
npm run start:xata
```

<details>
<summary> Yarn or PNPM</summary>

```sh
yarn start:xata
```

```sh
pnpm run start:xata
```

</details>

> ⚠️ once linked, you can just run `xata` to re-generate types.
### Start Coding 🚀
### Start Coding

Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

Expand Down

0 comments on commit d208c7d

Please sign in to comment.