This repository contains examples of Ermes serverless function written in GO.
A developer can fork this repo to write his functions.
It is recommended to use the provided DevContainer, as it already satisfy all the requirements.
Since the required dependencies are in private repositories, you need to clone the other Ermes repositories in the same parent folder, with this structure:
projects
└───ermes-sdk-go
│ │ ...
└───ermes-common
│ │ ...
└───ermes-function-template
│ │ ...
└───ermes-cli
│ ...
The function is compiled with the Ermes CLI (that allows to create compact WASM executables with TinyGo).
If you have installed the Ermes CLI locally, or you are using the DevContainer, you can see the available commands with:
ermes-cli helpRequirements:
- Docker
- GoLand or VSCode with the DevContainer extension
- Start Docker
- Open GoLand
- Open this project (or clone the repo if not already done)
- A popup should ask to reopen the project in the container, click
reopen
You can also start the container by navigating to the devcontainer.json file
and use the Services tab to manage existing containers.
- Start Docker
- Open the project in VSCode
- A popup should ask to reopen the project in the container, click 'Reopen'