This commit is contained in:
@@ -167,5 +167,5 @@ dist
|
||||
|
||||
.dev.vars
|
||||
.wrangler/
|
||||
bknd-types.d.ts
|
||||
userbase-types.d.ts
|
||||
worker-configuration.d.ts
|
||||
@@ -1,5 +1,5 @@
|
||||
# bknd starter: Cloudflare Workers
|
||||
A minimal Node.js project with bknd integration.
|
||||
# userbase starter: Cloudflare Workers
|
||||
A minimal Node.js project with userbase integration.
|
||||
|
||||
## Project Structure
|
||||
|
||||
@@ -13,7 +13,7 @@ Inside of your Node.js project, you'll see the following folders and files:
|
||||
└── wrangler.json
|
||||
```
|
||||
|
||||
To update `bknd` config, check `src/index.ts`.
|
||||
To update `userbase` config, check `src/index.ts`.
|
||||
|
||||
## Commands
|
||||
|
||||
@@ -34,4 +34,4 @@ npx wrangler d1 create my-database
|
||||
|
||||
## Want to learn more?
|
||||
|
||||
Feel free to check [our documentation](https://docs.bknd.io/integration/cloudflare) or jump into our [Discord server](https://discord.gg/952SFk8Tb8).
|
||||
Feel free to check [our documentation](https://docs.userbase.io/integration/cloudflare) or jump into our [Discord server](https://discord.gg/952SFk8Tb8).
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* We're using separate files, so that "wrangler" doesn't get bundled with your worker.
|
||||
*/
|
||||
|
||||
import { withPlatformProxy } from "bknd/adapter/cloudflare/proxy";
|
||||
import { withPlatformProxy } from "userbase/adapter/cloudflare/proxy";
|
||||
import config from "./config.ts";
|
||||
|
||||
export default withPlatformProxy(config);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { CloudflareBkndConfig } from "bknd/adapter/cloudflare";
|
||||
import type { CloudflareUserbaseConfig } from "userbase/adapter/cloudflare";
|
||||
|
||||
export default {
|
||||
d1: {
|
||||
session: true,
|
||||
},
|
||||
} satisfies CloudflareBkndConfig;
|
||||
} satisfies CloudflareUserbaseConfig;
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
"scripts": {
|
||||
"deploy": "wrangler deploy",
|
||||
"dev": "wrangler dev",
|
||||
"bknd-typegen": "PROXY=1 npx bknd types",
|
||||
"typegen": "wrangler types && npm run bknd-typegen",
|
||||
"userbase-typegen": "PROXY=1 npx userbase types",
|
||||
"typegen": "wrangler types && npm run userbase-typegen",
|
||||
"predev": "npm run typegen"
|
||||
},
|
||||
"dependencies": {
|
||||
"bknd": "file:../../app"
|
||||
"userbase": "file:../../app"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "^5.9.2",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { serve } from "bknd/adapter/cloudflare";
|
||||
import { serve } from "userbase/adapter/cloudflare";
|
||||
import config from "../config";
|
||||
|
||||
export default serve(config);
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
"exclude": ["test"],
|
||||
"include": [
|
||||
"worker-configuration.d.ts",
|
||||
"bknd-types.d.ts",
|
||||
"bknd.config.ts",
|
||||
"userbase-types.d.ts",
|
||||
"userbase.config.ts",
|
||||
"src/**/*.ts"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "node_modules/wrangler/config-schema.json",
|
||||
"name": "bknd-cf-worker-example",
|
||||
"name": "userbase-cf-worker-example",
|
||||
"main": "src/index.ts",
|
||||
"compatibility_date": "2025-08-03",
|
||||
"compatibility_flags": ["nodejs_compat"],
|
||||
@@ -15,14 +15,14 @@
|
||||
"d1_databases": [
|
||||
{
|
||||
"binding": "DB",
|
||||
"database_name": "bknd-dev-weur",
|
||||
"database_name": "userbase-dev-weur",
|
||||
"database_id": "81d8dfcc-4eaf-4453-8f0f-8f6d463fb867"
|
||||
}
|
||||
],
|
||||
"r2_buckets": [
|
||||
{
|
||||
"binding": "BUCKET",
|
||||
"bucket_name": "bknd-cf-example"
|
||||
"bucket_name": "userbase-cf-example"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user