SOMOD CLI is a toolset to Develop, Build and Reuse Serverless Applications. With the command-line interface (CLI) you can work with a SOMOD module using a terminal, or through automated scripts, enabling you to build, and prepare deployable applications.
This page contains a complete list of all SOMOD CLI commands available, along with their arguments and options for additional behavior
To download and install SOMOD CLI, run the following command
npm install somod --save-dev
All SOMOD commands need to be run under an npm package directory.
-h or --help
Displays the command usage instructions
--version
Displays the version of the SOMOD CLI
-v or --verbose
Runs the command in verbose mode. In verbose mode, the command outputs more info to stdout
buildnpx somod build
Validates the source and generates build directory. The directory structure is explained in detail here.
--ui--serverlesspreparenpx somod prepare
Prepares NextJs and AWS SAM Projects by combining all dependency modules.
--ui--serverless--debugdeploynpx somod deploy
Deploys the AWS SAM project to AWS Cloudformation. Internally calls build and prepare with --serverless option.
This command requires that AWS SAM is installed and configured to the right AWS Account. Refer to the Getting started with AWS SAM guide for setting up SAM.
-g or --guidedstartnpx somod start
This command starts the NextJs Server. Internally calls build and prepare with the --ui option.
Refer to the Next.js CLI guide for NextJs Commands.
--devparameters updatenpx somod parameters update
After deploying AWS SAM Project, this command updates the parameters.json with the exported parameters.
Refer to the Outputs section of serverless/template.yaml to know how to export an output from the Cloudformation stack to a parameter.
-s or --stack-namesamconfig.toml if omittedparameters validatenpx somod parameters validate
Validates the parameters.json file against the parameters schema
No command-specific options
Write an email to opensource@sodaru.com