MCPcopy Index your code
hub / github.com/Sandpack/nodebox-runtime / constructor

Method constructor

tests/setup/MockCdn.ts:22–33  ·  view source on GitHub ↗
(options: MockCdnOptions)

Source from the content-addressed store, hash-verified

20 private _url?: string;
21
22 constructor(options: MockCdnOptions) {
23 this.packages = options.packages;
24
25 this.app = setupApp();
26 this.app.log.level = 'error';
27
28 this.app.get('/', (req, res) => {
29 res.send(`This is a mock CDN for testing purposes.`);
30 });
31 this.app.get('/v2/deps/:query', this.dependencyQueryMiddleware.bind(this));
32 this.app.get('/v2/mod/:query', this.moduleQueryMiddleware.bind(this));
33 }
34
35 private respondWith(res: FastifyReply, data: unknown) {
36 res.type('application/octet-stream');

Callers

nothing calls this directly

Calls 2

setupAppFunction · 0.90
sendMethod · 0.45

Tested by

no test coverage detected