@hubspire/hubspire-cli
v3.1.4
Published
A command line cli developed by hubspire for npm workspace.
Downloads
96
Readme
Hubspire CLI
This CLI tool, built with Node.js, enables the generation of an NPM-based workspace. With this workspace, you can create Apollo GraphQL server-based applications, Node.js libraries, and serverless applications. The CLI also provides CRUD generation capabilities, allowing you to generate GraphQL queries and mutations with MongoDB as the data source. Its primary objective is to simplify the process of building a microservice architecture using Apollo GraphQL federation techniques. The below diagram shows the architecture of our microservice.
Installation
Hubspire CLI requires Node.js v16+ to run.
Install the dependencies and devDependencies and start the CLI.
cd hubspire-cli
npm i
npm run publish:local
Available commands
For npm workspace generation:
hsc create:workspace <workspace-name>
For application generation in NPM workspace:
hsc create:app <app-name> --type apollo
hsc create:app <app-name> --type subgraph
hsc create:app <app-name> --type serverless
hsc create:app <app-name> --type gateway
hsc create:app <app-name> --type express
For library generation in NPM workspace:
hsc create:lib <lib-name>
For CRUD generation in apollo graphql server application:
hsc create:crud <app-name> --entity <module-name>
For relationship generation in apollo graphql server application:
hsc create:relation <app-name> --entity <module-name>
For generating entire workspace using db design as json format:
hsc generate <json-file-path>
For seeding your mongoDB data for your docker mongo image
hsc seed:data <mongo-cluster-url> --mode export
hsc seed:data <mongo-cluster-url> --mode import
License
MIT
Free Software, Hell Yeah!