Serverless Template for Project Flogo
This repository contains template for deploying serverless apps, using the Serverless framework, built with the Go API of Project Flogo.
Building this app
- Create a new service based on this template from the same folder as your flogo.json file
serverless create -u https://github.com/tibcosoftware/flogo/tree/master/serverless -p myservice
-
Run make
in the myservice
directory
-
Run make deploy
to deploy your app to AWS Lambda. The response will look like something below
...
Service Information
service: myservice
stage: dev
region: us-east-1
stack: myservice-dev
api keys:
None
endpoints:
GET - https://xxx.execute-api.us-east-1.amazonaws.com/dev/hello
functions:
hello: myservice-dev-hello
...
- Test your API using cURL
curl --request GET --url https://xxx.execute-api.us-east-1.amazonaws.com/dev/hello --header 'content-type: application/json'
If you're looking for a more in-depth overview of how the app is built, check out the lab
Special note, this unfortunately only works under Linux or macOS systems or when using the Windows Subsystem for Linux (WSL). This is because Windows developers may have trouble producing a zip file that marks the binary as exectuable on Linux (see also here).