This folder contains a buildable/runnable template for a new custom application service based on the Pre-Release 2.x release of the App Functions SDK.
Note: If you only need to use the built-in pipeline functions, then it is advisable that you use
App Service Configurablerather then create a new custom application service. See here for more details onApp Service Configurable
Follow the instructions below to create your new customer application service:
-
Copy contents of this folder to your new folder
-
Change name
new-sample-appin go.mod file to an appropriate Go Module name for your service- Typically this is the URL to the repository for your service
-
Remove the
replacestatement from the go.mod file -
Do a global search and replace on
new-sample-appto replace it with the name of your service- Note that this name is used as the service key, so it needs to use dashes rather than spaces in the name and avoid other special characters
-
Adjust your local import statements to match the name you selected in the go.mod file
- Only needed in
main.goif the Go Module name changed to a URL
- Only needed in
-
Run unit tests to verify changes didn't break the code
make test
-
Verify you are able to build the executable
make build
-
Update the
Makefiledocker build to adjust image name appropriately -
Verify the docker image still builds with your new image name
make docker
-
Address all the TODO's in the source files and add your custom code
-
Build and test your new custom application service