Set Command
The set command is used to configure the tool's settings.
Command Overview
When you execute s set -h, you can view the corresponding help information:
$ s set -h
Usage: s set [commands] [options]
You can make some default settings for the tool here.
π Document: https://serverless.help/t/s/set
Options:
-h, --help Display help for command
Commands:
proxy [options] π§ Set proxy information
analysis π Set to enable or disable analysis
log π Set to enable or disable log
This command includes three sub-commands:
- proxy: Configure the global proxy for Serverless Devs
- analysis: Configure the data analysis actions performed by Serverless Devs
- log: Configure the logging actions of Serverless Devs
set proxy Command
This command sets a global proxy for HTTP requests.
Executing s set proxy -h displays the help documentation:
$ s set proxy -h
Usage: s set proxy [options]
Set proxy information.
Example:
$ s set proxy
$ s set proxy --http_proxy xxxx:xxx --https_proxy xxxx:xxx
$ s set proxy --enable
π Document: https://serverless.help/t/s/set
Options:
--enable whether to enable proxy
--no-enable whether to disable proxy
--http_proxy <http_proxy_value> Specify the http_proxy.
--https_proxy <https_proxy_value> Specify the https_proxy.
-h, --help Display help for command
There are two methods to set the proxy:
-
Direct configuration, for example:
s set proxy --http_proxy xxxx:xxx --https_proxy xxxx:xxx --enable -
Through an interactive method:
$ s set proxy ? Please enter http_proxy: xxxx:xxx ? Please enter https_proxy: xxxx:xxx ? Do you want to enable proxy Yes
set analysis Command
This command configures the data analysis capabilities of the Serverless Devs developer tool.
Executing s set analysis -h displays the help documentation:
$ s set analysis -h
Usage: s set analysis [options]
Set analysis action.
Example:
$ s set analysis
$ s set analysis disable
π Document: https://serverless.help/t/s/set
Options:
-h, --help Display help for command
There are two methods to set analysis:
-
Direct configuration, for example:
s set analysis disable -
Through an interactive method:
$ s set analysis π Current analysis action: enable ? Choose an action? (Use arrow keys) β― enable disableAt this point, you just need to select the corresponding option to operate in a guided manner.
π Note: The system default for analysis is:
enable
set log Command
This command configures the log writing capabilities of the Serverless Devs developer tool.
Executing s set log -h displays the help documentation:
$ s set log -h
Usage: s set log [options]
Set log action.
Example:
$ s set log
$ s set log enable
$ s set log disable
π Document: https://serverless.help/t/s/set
Options:
-h, --help Display help for command
There are two methods to set log:
-
Direct configuration, for example:
s set log disable -
Through an interactive method:
$ s set log π Current log action: enable ? Choose an action? (Use arrow keys) β― enable disableAt this point, you just need to select the corresponding option to operate in a guided manner.
π Note: The system default for log is:
enable