In this guide, you’ll create a new Qwik application and walk through adding Xata database. You’ll build the following basic blog application features:
- List all blog posts
- Retrieve and view a single blog post
Before you begin
Install the Xata CLI:
npm install -g @xata.io/cli
Once installed, authenticate the Xata CLI with your Xata account. If you don’t already have an account, you can use the same workflow to signup for a new account. Run the following command to begin the authentication workflow:
xata auth login
On completion, the command will create a new API key for your user account, which you should see in the account settings page within the Xata UI. That key will also be stored locally on your computer (the location might vary for each OS). It looks like this:
# .config/xata/credentials [default] apiKey=YOUR_API_KEY_HERE
Create a new Qwik.js app
Let’s begin by create a new Qwik.js application