Skip to content

A simple election application for educational purposes, using microservices architecture and Azure. Each branch has a version of the application, demonstrating cloud concepts and evolutive approach.

Notifications You must be signed in to change notification settings

joaovictorino/microservices-election

Repository files navigation

How to execute the election API sample

Prerequisites

  • Docker
  • Docker Compose
  • .Net 6 SDK

Architecture

alt architecture

First of all, run MongoDB and SQL Server inside docker-compose with the following command:

docker-compose up

After all databases is running, initiate new terminal, go to the folder CandidatesAPI, and then execute:

dotnet run

If command fails because of server certification, execute dotnet dev-certs https --trust

When CandidatesAPI is running, access https://localhost:7003/swagger/index.html and test CandidateAPI inside Swagger.

After everything is ok, go to VotesAPI folder and execute the sequence of commands bellow:

dotnet tool install -g dotnet-ef
export PATH="$PATH:/home/vscode/.dotnet/tools"
dotnet ef database update

After executed, SQL Server table will be created, and then execute dotnet run. Access https://localhost:7193/swagger/index.html and test, trying to vote.
There is others branchs inside this repository with more advanced examples of microservices using the election study case.

About

A simple election application for educational purposes, using microservices architecture and Azure. Each branch has a version of the application, demonstrating cloud concepts and evolutive approach.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published