24 lines
496 B
Go
24 lines
496 B
Go
package main
|
|
|
|
import "fmt"
|
|
import "log"
|
|
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")
|
|
|
|
http.HandleFunc(handler.MESSAGE_DRAFT_ENDPOINT, handler.DraftMessageHandler)
|
|
|
|
log.Println("Starting server", config.PORT)
|
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
|
}
|