Initialize web application via create-cloudflare CLI
Details: C3 = create-cloudflare@2.58.0 project name = nicholai-work-2026 framework = astro framework cli = create-astro@4.13.2 package manager = pnpm@10.23.0 wrangler = wrangler@4.53.0 git = 2.52.0
This commit is contained in:
parent
bd9aeae35b
commit
cf34ada8fb
6
.gitignore
vendored
6
.gitignore
vendored
@ -22,3 +22,9 @@ pnpm-debug.log*
|
|||||||
|
|
||||||
# jetbrains setting folder
|
# jetbrains setting folder
|
||||||
.idea/
|
.idea/
|
||||||
|
|
||||||
|
# wrangler files
|
||||||
|
.wrangler
|
||||||
|
.dev.vars*
|
||||||
|
!.dev.vars.example
|
||||||
|
!.env.example
|
||||||
|
|||||||
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"files.associations": {
|
||||||
|
"wrangler.json": "jsonc"
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -4,8 +4,17 @@ import mdx from '@astrojs/mdx';
|
|||||||
import sitemap from '@astrojs/sitemap';
|
import sitemap from '@astrojs/sitemap';
|
||||||
import { defineConfig } from 'astro/config';
|
import { defineConfig } from 'astro/config';
|
||||||
|
|
||||||
|
import cloudflare from '@astrojs/cloudflare';
|
||||||
|
|
||||||
// https://astro.build/config
|
// https://astro.build/config
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
site: 'https://example.com',
|
site: 'https://example.com',
|
||||||
integrations: [mdx(), sitemap()],
|
integrations: [mdx(), sitemap()],
|
||||||
|
adapter: cloudflare({
|
||||||
|
platformProxy: {
|
||||||
|
enabled: true
|
||||||
|
},
|
||||||
|
|
||||||
|
imageService: "cloudflare"
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
11
package.json
11
package.json
@ -5,14 +5,21 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "astro dev",
|
"dev": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro build && wrangler pages dev",
|
||||||
"astro": "astro"
|
"astro": "astro",
|
||||||
|
"deploy": "astro build && wrangler pages deploy",
|
||||||
|
"cf-typegen": "wrangler types"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@astrojs/cloudflare": "^12.6.12",
|
||||||
"@astrojs/mdx": "^4.3.12",
|
"@astrojs/mdx": "^4.3.12",
|
||||||
"@astrojs/rss": "^4.0.14",
|
"@astrojs/rss": "^4.0.14",
|
||||||
"@astrojs/sitemap": "^3.6.0",
|
"@astrojs/sitemap": "^3.6.0",
|
||||||
"astro": "^5.16.4",
|
"astro": "^5.16.4",
|
||||||
"sharp": "^0.34.3"
|
"sharp": "^0.34.3"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^24.10.1",
|
||||||
|
"wrangler": "^4.53.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
5044
pnpm-lock.yaml
generated
Normal file
5044
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
2
public/.assetsignore
Normal file
2
public/.assetsignore
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
_worker.js
|
||||||
|
_routes.json
|
||||||
5
src/env.d.ts
vendored
Normal file
5
src/env.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
type Runtime = import("@astrojs/cloudflare").Runtime<Env>;
|
||||||
|
|
||||||
|
declare namespace App {
|
||||||
|
interface Locals extends Runtime {}
|
||||||
|
}
|
||||||
@ -3,6 +3,10 @@
|
|||||||
"include": [".astro/types.d.ts", "**/*"],
|
"include": [".astro/types.d.ts", "**/*"],
|
||||||
"exclude": ["dist"],
|
"exclude": ["dist"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"strictNullChecks": true
|
"strictNullChecks": true,
|
||||||
|
"types": [
|
||||||
|
"./worker-configuration.d.ts",
|
||||||
|
"node"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10845
worker-configuration.d.ts
vendored
Normal file
10845
worker-configuration.d.ts
vendored
Normal file
File diff suppressed because it is too large
Load Diff
46
wrangler.jsonc
Normal file
46
wrangler.jsonc
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
/**
|
||||||
|
* For more details on how to configure Wrangler, refer to:
|
||||||
|
* https://developers.cloudflare.com/workers/wrangler/configuration/
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
"$schema": "node_modules/wrangler/config-schema.json",
|
||||||
|
"name": "nicholai-work-2026",
|
||||||
|
"compatibility_date": "2025-12-05",
|
||||||
|
"compatibility_flags": [
|
||||||
|
"nodejs_compat"
|
||||||
|
],
|
||||||
|
"pages_build_output_dir": "./dist",
|
||||||
|
"observability": {
|
||||||
|
"enabled": true
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Smart Placement
|
||||||
|
* Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
||||||
|
*/
|
||||||
|
// "placement": { "mode": "smart" }
|
||||||
|
/**
|
||||||
|
* Bindings
|
||||||
|
* Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including
|
||||||
|
* databases, object storage, AI inference, real-time communication and more.
|
||||||
|
* https://developers.cloudflare.com/workers/runtime-apis/bindings/
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Environment Variables
|
||||||
|
* https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
||||||
|
*/
|
||||||
|
// "vars": { "MY_VARIABLE": "production_value" }
|
||||||
|
/**
|
||||||
|
* Note: Use secrets to store sensitive data.
|
||||||
|
* https://developers.cloudflare.com/workers/configuration/secrets/
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* Static Assets
|
||||||
|
* https://developers.cloudflare.com/workers/static-assets/binding/
|
||||||
|
*/
|
||||||
|
// "assets": { "directory": "./public/", "binding": "ASSETS" }
|
||||||
|
/**
|
||||||
|
* Service Bindings (communicate between multiple Workers)
|
||||||
|
* https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
||||||
|
*/
|
||||||
|
// "services": [{ "binding": "MY_SERVICE", "service": "my-service" }]
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user