Skip to content

Latest commit

History

History

xata

Xata example

This example showcases how to use Remix with Xata as your data layer.

You get out-of-the-box:

  • API Route to connect to your Xata database
  • Type-safe Codegen

Preview

Open this example on CodeSandbox:

  • Open in CodeSandbox

Example

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

npx create-remix@latest --template xata remix-xata-app

Link Your Xata Workspace and Run Codegen

npm run xata:init

In case you have a workspace already linked, you will need to use --force flag to push the template schema on top of an existing one.

馃挕 consider installing the Xata CLI globally, it will likely improve your experience managing your databases

Once linked, you can just run xata:codegen to re-generate types.

Start Coding

Open http:https://localhost:3000 to view it in the browser.

馃挕 the template will prompt you to create a dummy new table (remix_with_xata_example) with some useful resources.

Related Links