The npx nanoctl simplifies the setup of new Nano Service projects, enabling developers to focus on writing backend logic rather than configuring boilerplate code.

Quick Project Initialization

Run the following command to create a new project:

  npx nanoctl@latest create project

Interactive Setup

The CLI will guide you step by step:

1

Choose a Template

Select from the available templates: HTTP API (A pre-configured Node.js + Express project) or ** Scheduled Jobs** (CRON-style workflows)

2

Project Name

Provide a name for your project.

3

Setup Complete

The project will be cloned into the selected directory with all dependencies ready to install.

Example:

1

Run the command

npx nanoservice-cli create project
2

Follow the interactive prompts

 Select a template: HTTP API
 Project Name: my-api-project
 Install dependencies and start coding:
3

Install dependencies and start coding

 cd my-api-project
 npm install
 npm run dev

Create env

Create .env.local file in the root directory with the following structure:

PORT=4000
WORKFLOWS_PATH=[PROJECT_PATH]/workflows
NODES_PATH=[PROJECT_PATH]/nodes

Replace [PROJECT_PATH] with the real project path