Spaces:
Paused
Paused
Download node_modules/msw/src/node/setupServer.ts from sam522/GenAI_Course: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/sam522/GenAI_Course/resolve/bbf0eafbb40cb551e2f40f8ad8a90a585be08221/node_modules/msw/src/node/setupServer.ts
- Command line
-
hf download hf://spaces/sam522/GenAI_Course@bbf0eafbb40cb551e2f40f8ad8a90a585be08221/node_modules/msw/src/node/setupServer.ts
-
curl -L -o setupServer.ts https://huggingface.co/spaces/sam522/GenAI_Course/resolve/bbf0eafbb40cb551e2f40f8ad8a90a585be08221/node_modules/msw/src/node/setupServer.ts
580 Bytes
| import type { RequestHandler } from '~/core/handlers/RequestHandler' | |
| import type { WebSocketHandler } from '~/core/handlers/WebSocketHandler' | |
| import { SetupServerApi } from './SetupServerApi' | |
| /** | |
| * Sets up a requests interception in Node.js with the given request handlers. | |
| * @param {RequestHandler[]} handlers List of request handlers. | |
| * | |
| * @see {@link https://mswjs.io/docs/api/setup-server `setupServer()` API reference} | |
| */ | |
| export const setupServer = ( | |
| ...handlers: Array<RequestHandler | WebSocketHandler> | |
| ): SetupServerApi => { | |
| return new SetupServerApi(handlers) | |
| } | |