1234567891011121314151617181920212223242526 |
- package main
- import (
- "log"
- "net/http"
- "strconv"
- )
- func main() {
- // initDatabase()
- http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
- // var Errors errorHandler.Errors
- // if !database.IsConnected {
- // Errors.InternalError("Conexão com a base de dados falhou!")
- // response.JSON(w, Errors)
- // return
- // }
- Routes.Match(w, r)
- })
- log.Fatal(http.ListenAndServe(":"+strconv.Itoa(SERVER_PORT), nil))
- }
|