bit-bundler-service is a standalone web service, currently at version 2.0.0, that exposes a GraphQL API for bundling JavaScript modules. It allows users to specify npm modules, optionally with versions, which are then bundled, minified, and provided with sourcemaps. Key goals for this experimental project included bundling GitHub projects, bundle splitting, Babel integration, and providing hypermedia responses and webhooks. The service offers a GraphQL interface to create and retrieve these bundles, aiming to simplify the module bundling process via an API. The project README indicates it's an experiment, suggesting a non-active release cadence and a focus on exploring GraphQL integration with bit-bundler rather than robust production deployment.
npm install bit-bundler-serviceVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to set up and run the bit-bundler-service locally, then interact with its GraphQL API to create and retrieve a bundled JavaScript module. It shows how to pass module details to `createBundle` and then fetch the resulting bundle using its ID.
Do not use this package for production environments. Consider actively maintained and production-ready bundlers or build services.
While `npm install` might proceed, direct execution `node index.js` on recent Node.js versions might fail due to deprecated APIs or syntax. Running an ancient Node.js v6 is a major security risk. No direct fix is available without source code modifications.
If deploying, implement robust security sandboxing, input validation, and whitelist modules and versions, or run in an isolated environment where bundle execution cannot compromise the host system.
Ensure Node.js v6 is used, as specified in `engines.node`. However, using such an old Node.js version is a major security risk. A more viable fix would involve updating the service's source code to be compatible with a modern Node.js runtime.
Specify a different port using the `PORT` environment variable: `PORT=8080 node index.js`
Ensure your HTTP POST request to `/graphql` includes a JSON body with a `query` field containing a valid GraphQL query string. When using `curl`, escape double quotes appropriately.
No dependency data recorded yet.