Skip to content

Demo Application built using Sysl-Go. Serves as a platform for showcasing Sysl-Go features.

Notifications You must be signed in to change notification settings

anz-bank/sysl-go-demo

Repository files navigation

Petdemo

Prerequisites

Generating the server

Sysl-go generates a fully functional Go server from specification alone. All files within the internal/gen directory are generated by Sysl-go. The generated files are committed into the repository, however for the purpose of instruction, these files can be regenerated with the following command

make all -B

Building application Docker container image

To build a docker container image for the application using the template Dockerfile, you first need to vendor all the dependencies. You can do so with the command

go mod vendor

Then run:

docker build -t docker_petdemo -f Dockerfile .

Running the application in a Docker container

To run the application inside the container, you need to prepare an application config file. Assuming you have an application config file present as config.yaml, the containerised application can be run as:

docker run --rm -t -p 8080:8080 --mount type=bind,source="$PWD"/config/config.yaml,target=/app/config.yaml,readonly docker_petdemo:latest /bin/Petdemo /app/config.yaml

Connecting to the application

To connect to the application, navigate to http://localhost:8080/pet in your browser or use the following curl command:

curl http://localhost:8080/pet

About

Demo Application built using Sysl-Go. Serves as a platform for showcasing Sysl-Go features.

Resources

Stars

Watchers

Forks

Packages

No packages published