由於項目使用到了 函數計算,特此了解到了需要安裝 阿里雲的Fun工具
Fun 是一個用於支持 Serverless 應用部署的工具,能幫助您便捷地管理函數計算、API 網關、日志服務等資源。它通過一個資源配置文件(template.yml),協助您進行開發、構建、部署操作。
windows安裝教程如下:
通過 npm 安裝 Fun
安裝它的方式是通過 npm:
$ npm install @alicloud/fun -g
安裝完成之后,會有一個 fun 命令提供使用。輸入 fun 命令可以查看幫助信息:
$ fun -h
Usage: fun [options] [command]
The fun tool use template.yml to describe the API Gateway & Function Compute things, then publish it online. Options: -v, --version output the version number -h, --help output usage information Commands: config Configure the fun validate [options] Validate a fun template deploy Deploy a project to AliCloud build Build the dependencies
添加全局環境變量,使其在 各個目錄都可使用
因為通過npm安裝,會將 Fun工具安裝到 nodejs中;
假設nodejs安裝在 D:\nodejs,則Fun啟動的命令文件在D:\nodejs\node_global 文件夾下
系統環境變量添加如下:
這樣便可以在任何路徑下 方便的玩耍了。。。
相關網址: