Added config package
This commit is contained in:
+3
-2
@@ -5,19 +5,20 @@ import "fmt"
|
|||||||
import "log"
|
import "log"
|
||||||
import "net/http"
|
import "net/http"
|
||||||
|
|
||||||
|
import "git.kundeng.us/phoenix/textsender-api/internal/config"
|
||||||
|
|
||||||
type MessageItem struct {
|
type MessageItem struct {
|
||||||
Id int `json:"id"`
|
Id int `json:"id"`
|
||||||
Message string `json:"message"`
|
Message string `json:"message"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const PORT = 8080
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
fmt.Println("textsender-api")
|
fmt.Println("textsender-api")
|
||||||
|
|
||||||
http.HandleFunc("/api/v1/message/draft", draftMessageHandler)
|
http.HandleFunc("/api/v1/message/draft", draftMessageHandler)
|
||||||
|
|
||||||
log.Println("Starting server", PORT)
|
log.Println("Starting server", config.PORT)
|
||||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
package config
|
||||||
|
|
||||||
|
const PORT = 8080
|
||||||
Reference in New Issue
Block a user