Refactored the code some more
This commit is contained in:
+2
-7
@@ -7,17 +7,12 @@ import "net/http"
|
||||
import "git.kundeng.us/phoenix/textsender-api/internal/config"
|
||||
import "git.kundeng.us/phoenix/textsender-api/internal/handler"
|
||||
|
||||
type MessageItem struct {
|
||||
Id int `json:"id"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
|
||||
func main() {
|
||||
fmt.Println("textsender-api")
|
||||
fmt.Println(config.APP_NAME)
|
||||
|
||||
http.HandleFunc(handler.MESSAGE_DRAFT_ENDPOINT, handler.DraftMessageHandler)
|
||||
|
||||
log.Println("Starting server", config.PORT)
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
log.Fatal(http.ListenAndServe(config.PortString(), nil))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user