Intro. Quick recommendations and tips for various processes.
serverless deploy
when you've made changes to serverless.yml
and in CI/CD systemsserverless invoke --function myFunction
to test your Alibaba Cloud Function Compute functionsserverless logs --function myFunction
A handy list of commands to use when developing with the Serverless Framework.
aliyun-nodejs
templateserverless create --template aliyun-nodejs --path my-service
cd my-service
npm install
serverless.yml
Update credentials
in your projects serverless.yml
See credentials doc on how to setup your credentials.
This is a convenience method to install a pre-made Serverless Service locally by downloading the Github repo and unzipping it.
serverless install -u [GITHUB URL OF SERVICE]
Use this when you have made changes to your Functions, Events or Resources in serverless.yml
or you simply want to deploy all changes within your Service at the same time.
serverless deploy
Invokes an Alibaba Cloud Function
serverless invoke --function [FUNCTION NAME]
Open up a separate tab in your console and see logs for a specific function using the following command.
serverless logs --function [FUNCTION NAME]
See information about your deployed service by running the info
command in your service directory.
serverless info
Product