MCPcopy
hub / github.com/prisma/prisma / startStudioServer

Function startStudioServer

packages/cli/src/studio-server.ts:19–30  ·  view source on GitHub ↗
(options: StartStudioServerOptions)

Source from the content-addressed store, hash-verified

17}
18
19export function startStudioServer(options: StartStudioServerOptions): StudioServer {
20 switch (runtime) {
21 case 'node':
22 return startNodeStudioServer(options)
23 case 'bun':
24 return startBunStudioServer(options)
25 case 'deno':
26 return startDenoStudioServer(options)
27 default:
28 throw new Error(`Unsupported runtime for Studio server: "${runtime}"`)
29 }
30}
31
32function startNodeStudioServer({ handler, onListen, port }: StartStudioServerOptions): StudioServer {
33 const server = createServer(async (nodeRequest, nodeResponse) => {

Callers 2

parseMethod · 0.90
startTestServerFunction · 0.90

Calls 3

startNodeStudioServerFunction · 0.85
startBunStudioServerFunction · 0.85
startDenoStudioServerFunction · 0.85

Tested by 1

startTestServerFunction · 0.72