A collection of some small sample projects written in Go
This module contains a small go app which communicates with a postgres database. The database itself is run inside a docker-container (see here: docker-compose.yml).
The go-docker
module contains a small go server built with the gin framework.
The server can be deployed through the given Dockerfile.
Alternatively, the docker-image and the respective containers can be built through the docker-compose.yml.
For more information you may visit this tutorial!
Use the commands listed below to build the image and run your container:
docker build . -t go-docker
docker run -p 3000:3000 go-docker
The module contains a very small sample app which introduces and showcases basic concepts of GraphQL and their usage in Golang.
The microservices-module contains a small sample project which shows how to structure your application to realize a microservice's pattern. In this sample a user-service is created which then is exposed to be accessible via a client. Moreover, the application is connected to a postgres database, so that newly created user-data will be stored there.
This module contains a sketch of a rest-server built with the gorilla framework.
Apart from that, this sample project contains some basic methods for working with self-declared data-classes (e.g. an Article
class).
The websocket
module contains a sketch of a websocket built with the gorilla framework.
The running server can be accessed through the given index.html
file.