Skip to content

Commit 9a9ecf2

Browse files
authored
feat(examples): add --watch to bun serve commands for auto-restart, and have npm start hit dev mode of all examples (#246)
* feat(examples): add --watch to bun serve commands for auto-restart on file changes * Update package.json * regen
1 parent 6bb63c3 commit 9a9ecf2

File tree

20 files changed

+20
-20
lines changed

20 files changed

+20
-20
lines changed

examples/basic-host/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"build": "tsc --noEmit && concurrently \"cross-env INPUT=index.html vite build\" \"cross-env INPUT=sandbox.html vite build\"",
88
"watch": "concurrently \"cross-env INPUT=index.html vite build --watch\" \"cross-env INPUT=sandbox.html vite build --watch\"",
9-
"serve": "bun serve.ts",
9+
"serve": "bun --watch serve.ts",
1010
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
1111
"dev": "cross-env NODE_ENV=development concurrently \"npm run watch\" \"npm run serve\""
1212
},

examples/basic-server-preact/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve": "bun server.ts",
21+
"serve": "bun --watch server.ts",
2222
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
2323
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
2424
"prepublishOnly": "npm run build"

examples/basic-server-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve": "bun server.ts",
21+
"serve": "bun --watch server.ts",
2222
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
2323
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
2424
"prepublishOnly": "npm run build"

examples/basic-server-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve": "bun server.ts",
21+
"serve": "bun --watch server.ts",
2222
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
2323
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
2424
"prepublishOnly": "npm run build"

examples/basic-server-svelte/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve": "bun server.ts",
21+
"serve": "bun --watch server.ts",
2222
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
2323
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
2424
"prepublishOnly": "npm run build"

examples/basic-server-vanillajs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve": "bun server.ts",
21+
"serve": "bun --watch server.ts",
2222
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
2323
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
2424
"prepublishOnly": "npm run build"

examples/basic-server-vue/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve": "bun server.ts",
21+
"serve": "bun --watch server.ts",
2222
"start": "cross-env NODE_ENV=development npm run build && npm run serve",
2323
"dev": "cross-env NODE_ENV=development concurrently 'npm run watch' 'npm run serve'",
2424
"prepublishOnly": "npm run build"

examples/budget-allocator-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve:http": "bun server.ts",
21+
"serve:http": "bun --watch server.ts",
2222
"serve:stdio": "bun server.ts --stdio",
2323
"start": "npm run start:http",
2424
"start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http",

examples/cohort-heatmap-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve:http": "bun server.ts",
21+
"serve:http": "bun --watch server.ts",
2222
"serve:stdio": "bun server.ts --stdio",
2323
"start": "npm run start:http",
2424
"start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http",

examples/customer-segmentation-server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"scripts": {
1919
"build": "tsc --noEmit && cross-env INPUT=mcp-app.html vite build",
2020
"watch": "cross-env INPUT=mcp-app.html vite build --watch",
21-
"serve:http": "bun server.ts",
21+
"serve:http": "bun --watch server.ts",
2222
"serve:stdio": "bun server.ts --stdio",
2323
"start": "npm run start:http",
2424
"start:http": "cross-env NODE_ENV=development npm run build && npm run serve:http",

0 commit comments

Comments
 (0)