serverless-leo

所属分类:FaaS/Serverless
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2024-01-29 17:09:37
上 传 者sh-1993
说明:  无服务器插件。使用无服务器部署您的狮子座机器人和微服务。此外,一些CLI工具可以查看总线上发生的情况。
(Serverless plugin. Deploy your leo bots and microservices using serverless. Also, some CLI tools to view what is happening on the bus.)

文件列表:
examples/
src/
templates/
.eslintrc.js
LICENSE
package-lock.json

# Documentation [Go to Docs](https://github.com/LeoPlatform/serverless-leo/tree/master/src#serverless-leo) # Compatibility serverless-leo version 3 is compatible with serverless@2 and serverless@3 serverless@1 is not supported ## Examples [NodeJS](https://github.com/LeoPlatform/serverless-leo/tree/master/examples/nodejs) [NodeJS Lambda Layer](https://github.com/LeoPlatform/serverless-leo/tree/master/examples/nodejs-lambda-layer) [Python](https://github.com/LeoPlatform/serverless-leo/tree/master/examples/python) [Java](https://github.com/LeoPlatform/serverless-leo/tree/master/examples/java-quickstart) ## Starting a new project with example bots ```bash serverless create --template-url https://github.com/LeoPlatform/serverless-leo/tree/master/templates/microservice -p my-microservice cd my-microservice npm install serverless create bot --name my-bot-name --type load --language node --destination my-write-queue ``` At this point, you will have a new project with a `bots` directory including your new bot. There are two things to setup before your service can be deployed. 1. Set the name and deploymentBucket of your service in the root `serverless.yml` file 2. Update the `leo_config.js` file to include the leo bus values your service will use ## Rust specific 1. In order to register this lambda in your workspace, you need to add the relative path to the newly created folder in your root cargo.toml workspace members. 2. Update the bus_config() of the main.rs in your newly created bot template to have the correct provider information. Once you've made these changes, you can run `serverless deploy` which will use your default AWS_PROFILE. ## Developing on this Project Locally 1. Clone project locally 2. Run `npm link` in this project's `/src` directory. 3. In a test project, run `npm link serverless-leo`. - At this point, any `serverless` commands will use your local `serverless-leo` plugin Additionally, if you are making bot template changes, you can temporarily add this to the bottom of `create:bot:copy-template` hook in order to use local path files instead of the repo url. ```js this.options['template-path'] = path.resolve(`${__dirname}/../templates/bot/${language}/${type}`) delete this.options['template-url'] ```

近期下载者

相关文件


收藏者