Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bytekast/serverless-webassembly
https://github.com/bytekast/serverless-webassembly
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/bytekast/serverless-webassembly
- Owner: bytekast
- Created: 2019-10-27T03:48:45.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-09T22:29:46.000Z (almost 2 years ago)
- Last Synced: 2023-04-10T16:09:17.381Z (over 1 year ago)
- Language: Rust
- Size: 166 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Serverless WebAssembly Template
This is a simple Serverless application written in Rust, compiled to WebAssembly and deployed to AWS Lambda using the Serverless Framework.
## 📦 Prerequisites
Install [Rust](https://www.rust-lang.org/tools/install).
`curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`
Install the Rust => WebAssembly compiler: [wasm-pack](https://github.com/rustwasm/wasm-pack)
`cargo install wasm-pack`
Install [Node](https://www.npmjs.com/get-npm).
Install the [Serverless Framework](https://serverless.com/framework/).
`npm install -g serverless`
## 🏗️ Create
```
sls create --template-url https://github.com/bytekast/serverless-webassembly --path my-service
cd my-service
```## 🦀 Build
`npm install`
## 🔫 Run Locally
`npm run local`
## 🛵 Deploy
`sls deploy`
```bash
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
.....
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service my-service.zip file to S3 (124.08 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
..............................
Serverless: Stack update finished...
Service Information
service: my-service
stage: dev
region: us-east-1
stack: my-service-dev
resources: 10
api keys:
None
endpoints:
GET - https://xxxxxx.execute-api.us-east-1.amazonaws.com/dev/hello
functions:
hello: my-service-dev-hello
layers:
None
Serverless: Run the "serverless" command to setup monitoring, troubleshooting and testing.
```