Skip to main content
Glama
to-file-transport-with-transform.js479 B
'use strict' const fs = require('node:fs') const { once } = require('node:events') const { Transform } = require('node:stream') async function run (opts) { if (!opts.destination) throw new Error('kaboom') const stream = fs.createWriteStream(opts.destination) await once(stream, 'open') const t = new Transform({ transform (chunk, enc, cb) { setImmediate(cb, null, chunk.toString().toUpperCase()) } }) t.pipe(stream) return t } module.exports = run

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/krtw00/search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server