ipfs-gateway-emulator
Version:
A server emulating IPFS gateway behaviour, for local preview and end-to-end tests
11 lines (8 loc) • 352 B
JavaScript
import fs from 'node:fs';
import path from 'node:path';
import {fileURLToPath} from 'node:url';
import {run} from '../lib/cli.js';
const here = path.dirname(fileURLToPath(import.meta.url));
const pkg = JSON.parse(fs.readFileSync(path.join(here, '..', 'package.json'), 'utf8'));
run(process.argv.slice(2), {version: pkg.version});