SherpaJS CLI
The SherpaJS command-line interface (CLI) allows you to develop, build, start your application, and more.
Installation
To install the SherpaJS CLI, simply run the following command:
npm install sherpa-core -g
This command will globally install the SherpaJS core package, enabling you to utilize its features across your system. Once installed, you can easily run the SherpaJS command-line interface (CLI) using the following command:
sherpa
Commands
CLI for SherpaJS - Modular Microservices Framework
sherpa [options] [command]
Options:
-V
,--version
output the version number-h
,--help
display help for command
Commands:
build [options]
Creates a production build of your applicationstart [options]
Start a production build of your applicationclean [options]
Removes all build directories of your applicationdev [options]
Start a server in development mode with hot-reloadhelp [command]
display help for command
Build Command
Creates a production build of your application.
sherpa build [options]
Options:
-i
,--input <path>
path to SherpaJS server, defaults to current directory-o
,--output <path>
path to server output, defaults to input directory-b
,--bundler <type>
platform bundler ("Vercel", "local*", default: "local")-v
,--variable [key values...]
Specify optional environment variables as key=value pairs Ex.foo=bar test="1234 HI"
--dev
enable development mode, does not minify output-h
,--help
display help for command
Start Command
Start a production build of your application. Ensure you have created a local build, with "sherpa build" first.
sherpa start [options]
Options:
-i
,--input <path>
path to SherpaJS server, defaults to current directory-p
,--port <number>
port number (default: "3000")-h
,--help
display help for command
Clean Command
Removes all build directories of your application.
sherpa clean [options]
Options:
-i
,--input <path>
path to SherpaJS build directories, defaults to current directory-h
,--help
display help for command
Dev Command
Start a server in development mode with hot-reload.
sherpa dev [options]
Options:
-i
,--input <path>
path to SherpaJS server, defaults to current directory-o
,--output <path>
path to server output, defaults to input directory-v
,--variable [key values...]
Specify optional environment variables as key=value pairs Ex.foo=bar test="1234 HI"
-p
,--port <number>
port number (default: "3000")-h
,--help
display help for command