Skip to content

Commit bc44bf0

Browse files
authored
fix: hot reload functions in dev (#842)
# What Automatically reload functions when the code changes when running the MCP Inspector playground locally
1 parent c249bb0 commit bc44bf0

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.changeset/clear-owls-attack.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@gram-ai/create-function": minor
3+
---
4+
5+
Enables hot reloading in dev for function templates

ts-framework/create-function/gram-template-gram/CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
## `package.json` scripts
1515

16+
- `dev` - Runs the MCP Inspector playground with hot reloading enabled.
1617
- `build` - Bundles the Gram Functions code into a zip file for deployment and places it in the `dist/` directory.
1718
- `lint` - Runs the TypeScript compiler in `noEmit` mode to check for type errors.
1819

ts-framework/create-function/gram-template-gram/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"node": ">=22.18.0"
2020
},
2121
"scripts": {
22-
"dev": "mcp-inspector node ./src/server.ts",
22+
"dev": "mcp-inspector nodemon -q --watch src --exec node ./src/server.ts",
2323
"lint": "tsc --noEmit",
2424
"_:build": "gf build",
2525
"push": "gf push",
@@ -33,7 +33,8 @@
3333
},
3434
"devDependencies": {
3535
"@modelcontextprotocol/inspector": "^0.17.1",
36+
"nodemon": "^3.1.9",
3637
"@types/node": "22.x",
3738
"typescript": "^5"
3839
}
39-
}
40+
}

ts-framework/create-function/gram-template-mcp/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"node": ">=22.18.0"
2020
},
2121
"scripts": {
22-
"dev": "mcp-inspector node ./src/server.ts",
22+
"dev": "mcp-inspector nodemon -q --watch src --exec node ./src/server.ts",
2323
"_:build": "gf build",
2424
"push": "gf push",
2525
"prebuild": "tsc -p tsconfig.json",
@@ -32,7 +32,8 @@
3232
},
3333
"devDependencies": {
3434
"@modelcontextprotocol/inspector": "^0.17.1",
35+
"nodemon": "^3.1.9",
3536
"@types/node": "22.x",
3637
"typescript": "^5"
3738
}
38-
}
39+
}

0 commit comments

Comments
 (0)