πŸ’Ύ Cloudflare D1

πŸ’Ύ Cloudflare D1

Create a database

Step 1

Create a preview database.

Step 2

Create a production database.

Run this command three times to create two databases.

wrangler d1 create <DATABASE_NAME>

The output will look like this:

βœ… Successfully created DB '<DATABASE_NAME>'
 
[[d1_databases]]
binding = "DB"
database_name = "<DATABASE_NAME>"
database_id = "<unique-ID-for-your-database>"