Add RESOURCE_MIME_TYPE constant (#108)
* Add RESOURCE_MIME_TYPE constant * Update app-bridge.ts * update syntax
This commit is contained in:
parent
f712008be4
commit
3ac7c7935b
1 changed files with 24 additions and 20 deletions
4
examples/budget-allocator-server/server.ts
Normal file → Executable file
4
examples/budget-allocator-server/server.ts
Normal file → Executable file
|
|
@ -16,7 +16,7 @@ import express, { type Request, type Response } from "express";
|
|||
import fs from "node:fs/promises";
|
||||
import path from "node:path";
|
||||
import { z } from "zod";
|
||||
import { RESOURCE_URI_META_KEY } from "../../dist/src/app";
|
||||
import { RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY } from "../../dist/src/app";
|
||||
|
||||
const PORT = process.env.PORT ? parseInt(process.env.PORT, 10) : 3001;
|
||||
const DIST_DIR = path.join(import.meta.dirname, "dist");
|
||||
|
|
@ -286,7 +286,7 @@ server.registerResource(
|
|||
);
|
||||
return {
|
||||
contents: [
|
||||
{ uri: resourceUri, mimeType: "text/html;profile=mcp-app", text: html },
|
||||
{ uri: resourceUri, mimeType: RESOURCE_MIME_TYPE, text: html },
|
||||
],
|
||||
};
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue