Skip to content

Commit a3496bf

Browse files
c3: add extra information about asset serving to hello-world templates (#9332)
1 parent 3c770ec commit a3496bf

File tree

15 files changed

+19
-7
lines changed

15 files changed

+19
-7
lines changed

.changeset/violet-hats-guess.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"create-cloudflare": patch
3+
---
4+
5+
add extra information about asset serving to hello-world templates

packages/create-cloudflare/templates/hello-world-assets-only/templates/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
</head>
88
<body>
99
<h1 id="heading">Hello, World!</h1>
10+
<p>This page comes from a static asset stored at `public/index.html` as configured in `wrangler.jsonc`.</p>
1011
</body>
1112
</html>

packages/create-cloudflare/templates/hello-world-assets-only/templates/wrangler.jsonc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "<TBD>",
33
"compatibility_date": "<TBD>",
44
"assets": {
5+
// The path to the directory containing the `index.html` file to be served at `/`
56
"directory": "./public"
67
},
78
"observability": {

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<meta charset="UTF-8" />
55
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
66
<title>Hello, World!</title>
7+
<p>This page comes from a static asset stored at `public/index.html` as configured in `wrangler.jsonc`.</p>
78
</head>
89
<body>
910
<h1 id="heading"></h1>

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"main": "src/index.js",
44
"compatibility_date": "<TBD>",
55
"assets": {
6-
"binding": "ASSETS",
6+
// The path to the directory containing the `index.html` file to be served at `/`
77
"directory": "./public"
88
},
99
"durable_objects": {

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/py/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</head>
88
<body>
99
<h1 id="heading"></h1>
10+
<p>This page comes from a static asset stored at `public/index.html` as configured in `wrangler.jsonc`.</p>
1011
<script>
1112
fetch('/message')
1213
.then((resp) => resp.text())

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/py/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"python_workers"
77
],
88
"assets": {
9-
"binding": "ASSETS",
9+
// The path to the directory containing the `index.html` file to be served at `/`
1010
"directory": "./public"
1111
},
1212
"migrations": [

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</head>
88
<body>
99
<h1 id="heading"></h1>
10+
<p>This page comes from a static asset stored at `public/index.html` as configured in `wrangler.jsonc`.</p>
1011
<script>
1112
fetch('/message')
1213
.then((resp) => resp.text())

packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/wrangler.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
}
1212
],
1313
"assets": {
14-
"binding": "ASSETS",
14+
// The path to the directory containing the `index.html` file to be served at `/`
1515
"directory": "./public"
1616
},
1717
"durable_objects": {

packages/create-cloudflare/templates/hello-world-with-assets/js/public/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
</head>
88
<body>
99
<h1 id="heading"></h1>
10+
<p>This page comes from a static asset stored at `public/index.html` as configured in `wrangler.jsonc`.</p>
1011
<button id="button" type="button">Fetch a random UUID</button>
1112
<output id="random" for="button"></output>
1213
<script>

0 commit comments

Comments
 (0)