-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
28 lines (21 loc) · 777 Bytes
/
main.go
File metadata and controls
28 lines (21 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"api-pix-go/config"
"api-pix-go/controllers"
"log"
"net/http"
"github.com/gorilla/mux"
)
func main() {
config.LoadEnv() // Carregar as variáveis de ambiente
r := mux.NewRouter()
r.HandleFunc("/api/pix/create", controllers.CreatePix).Methods("POST")
r.HandleFunc("/api/pix/status/{txid}", controllers.GetPixStatus).Methods("GET")
r.HandleFunc("/api/pix/{txid}", controllers.GetPixByTxID).Methods("GET")
r.HandleFunc("/api/pix/list", controllers.GetPixList).Methods("GET")
port := config.GetPort()
log.Printf("Servidor rodando na porta %s", port)
log.Fatal(http.ListenAndServe(":"+port, r))
}
// Simulação de mudança para testar o CI/CD #0 - Anderson Gaitolini
// Simulação de mudança para testar o CI/CD #1 - Anderson Gaitolini