Rotating Pairs Back-End
π Back-End of Rotating Pairs Web Application. Responsible for saving monitoring logs and
Returning the positions of combinations used in the application (Limited beetwen 2 and 10), like this. ππ½
π Table of Contents
===================
π Dependencies and Environment
π Installing
π Testing
π Using
π Learn More
π License
π Author
===================
The front-end source code hear.
π» Dependencies and Environment
My dependencies and versions
Go: go version go1.22.0 windows/amd64
If you will exec in local environment, you will need the docker and docker-compose to create a MongoDb Instance:
Docker: Docker version 25.0.3, build 4debf41
docker-compose: Docker Compose version v2.24.5-desktop.1
π Installing
You will need a MongoDB instance, we have a ready image and docker-compose configuration in data folder, you can exec duying this:
#Go to 'data' folder
cd data
# container with MongoDB instance
$ docker-compose up -d
This execution uploads a MongoDB container with some initialized limited values, you can see them in init-mongo.js
You will need to a .env file in root folder
MONGODB_URI=mongodb://localhost:27017
MONGODB_DATABASE_NAME=test
ENV=development
π§ͺ Testing
OBSERVATION: To run the tests, MongoDB must be running
A truncate script is executed each time the tests are run and the database is reset to an initial state with limited data values. That is, if you are working and running the tests, the data will be lost.
go test -p 1 ./src/...
β Using
First, check the dependencies and the installation process:
Going to root folder and exec:
go run .\main.go
Now you can open http://localhost:8080 with your browser to see the result.
You can see the routes documentation in 'rest' folder, this files using de REST Client extension of VSCode, but you can export it any way you want
π Learn More
To learn more about technologies used in the application:
-
Go - learn about Go features and API.
-
Railway - learn about Railway features and API.
-
Docker - learn about Docker features and API.
-
Docker Compose - learn about Docker Compose features and API.
π License
Project have a GNU GENERAL PUBLIC LICENSE.
π· Author
Made by Glener Pizzolato! π