Spaces:
Runtime error
Runtime error
Download api/src/plugins/browser-session.ts from supernovagateway/Steel: direct link, hf CLI and curl.
- Browser
- Download file 528 Bytes
-
https://huggingface.co/spaces/supernovagateway/Steel/resolve/main/api/src/plugins/browser-session.ts
- Command line
-
hf download hf://spaces/supernovagateway/Steel/api/src/plugins/browser-session.ts
-
curl -L -o browser-session.ts https://huggingface.co/spaces/supernovagateway/Steel/resolve/main/api/src/plugins/browser-session.ts
528 Bytes
| import { FastifyPluginAsync } from "fastify"; | |
| import fp from "fastify-plugin"; | |
| import { SessionService } from "../services/session.service.js"; | |
| const browserSessionPlugin: FastifyPluginAsync = async (fastify, _options) => { | |
| const sessionService = new SessionService({ | |
| cdpService: fastify.cdpService, | |
| seleniumService: fastify.seleniumService, | |
| fileService: fastify.fileService, | |
| logger: fastify.log, | |
| }); | |
| fastify.decorate("sessionService", sessionService); | |
| }; | |
| export default fp(browserSessionPlugin, "5.x"); | |