Runtimes
Node Runtime
Server usage with @meshkit/node.
Use @meshkit/node for servers, workers, CLIs, integration tests, and backend jobs that can safely read environment variables and call trusted provider endpoints.
Node is usually the safest place to keep provider tokens and operate Kubo, metadata, Filecoin, policy, or gateway services.
Install
npm install @meshkit/nodeCreate A Node Client
import { createMeshkitNode, detectNodeCapabilities } from "@meshkit/node";
const capabilities = detectNodeCapabilities();
const mesh = await createMeshkitNode({
identity: process.env.MESHKIT_IDENTITY ?? "server",
});
console.log({
filesystem: capabilities.filesystem,
streams: capabilities.streams,
provider: mesh.providers.current().name,
});Node Strengths
- Environment-based provider configuration
- Server-side secret handling
- Filesystem access
- Stream processing
- Worker and cron-style execution
- CLI and integration-test workflows
Node Caveats
- Process memory is not a durable key vault by itself.
- Server logs can easily leak plaintext if you log decrypted values.
- Provider tokens should stay in environment variables or secret managers.
- Background work should be explicit: workers, queues, cron jobs, or process supervisors.
Recommended Production Shape
Node service
-> @meshkit/node
-> provider config from environment
-> trusted IPFS/metadata/policy/persistence endpoints
-> application database stores CIDs, proof summaries, capsule IDs, job IDs