feat(cli): add alchemy and improve cli tooling and structure (#520)

This commit is contained in:
Aman Varshney
2025-08-20 23:43:58 +05:30
committed by GitHub
parent c5430ae4fd
commit 5788876c47
152 changed files with 5804 additions and 2264 deletions

View File

@@ -0,0 +1,34 @@
{
"name": "{{projectName}}-server",
"main": "src/index.ts",
"compatibility_date": "2025-06-15",
"compatibility_flags": ["nodejs_compat"],
"vars": {
"NODE_ENV": "production"
// Add public environment variables here
// Example: "CORS_ORIGIN": "https://your-domain.com"
}
// For sensitive data, use:
// wrangler secret put SECRET_NAME
// Don't add secrets to "vars" - they're visible in the dashboard!
{{#if (eq dbSetup "d1")}},
// To set up D1 database:
// 1. Run: wrangler login
// 2. Run: wrangler d1 create your-database-name
// 3. Copy the output and paste below
// Then run migrations:
// bun db:generate
// To apply migrations locally, run:
// wrangler d1 migrations apply YOUR_DB_NAME --local
"d1_databases": [
{
"binding": "DB",
"database_name": "YOUR_DB_NAME",
"database_id": "YOUR_DB_ID",
"preview_database_id": "local-test-db",
"migrations_dir": "./src/db/migrations"
}
]
{{/if}}
}