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 an automated system, 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 behaviour
To download and install SOMOD CLI, run the following command
npm install somod --save-dev
All SOMOD commands needs to be run under a npm package directory.
-h or --help
Displays a help about the command
--version
Displays the version of the SOMOD CLI
-v or --verbose
Runs the command in verbose mode. In verbose mode command outputs more info to stdout
buildnpx somod build
Validates the source and generates build directory. The directory strcuture is explained in detail here.
--ui--serverlesspreparenpx somod prepare
Prepares NextJs and AWS SAM Projects by combining all dependency modules.
--ui--serverlessdeploynpx 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 right AWS Account. Refer 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 --ui option.
Refer the Next.js CLI guide for NextJs Commands.
-d or --devupdate-paramsnpx somod update-params
After deploying AWS SAM Project, this command updates the parameters.json with the exported parameters.
Read the SOMOD Serverless template.yaml guide to define the exported parameter.
-s or --stack-nameIn the Next Chapter let us explore the way of extending the SOMOD through Plugins.
Write an email to somod@sodaru.com