CLI
nanoservice-ts
is using npx for our CLI called nanoctl
. nanoctl
is a command-line tool designed to simplify the creation and setup of nanoservice projects. It enables developers to quickly initialize ready-to-use project structures with minimal configuration.
Commands
Below is the list of all existing npx nanoctl
commands:
Create Project
Command responsbile for instantiating a new nanoservice project.
npx nanoctl@latest create project .
Requests the following parameters via the CLI:
Assign a name to the project
Create project name.
Choose the trigger to install
Select a default workflow trigger to install (ex. HTTP). For the list of available triggers and their configurations, check the Triggers page.
Navigate to the project directory and run it
cd <project-name> && npm run dev
Then open the browser and navigate to http://localhost:4000/health-check
.
The new nanoservice-ts project will be created in the current directory. To learn more visit Initialization Guide.
You can also specify the project name as an argument:
Create Node
Command responsbile for instantiating a new nanoservice project.
npx nanoctl@latest create node .
Requests the following parameters via the CLI:
Assign a name to the node
Create the node name.
A new node will be created in the nodes
directory of an active nanoservice project. To learn more about nodes, visit the Nodes page. For a detailed guide on how to create a custom node and use it, check out the Quickstart page.
You can also specify the node name as an argument: