Refactor project structure: modularized code into pkg and cmd directories, added unit tests, improved CI/CD pipeline, and enhanced documentation.
This commit is contained in:
0
cmd/diunwebhook/.keep
Normal file
0
cmd/diunwebhook/.keep
Normal file
17
cmd/diunwebhook/main.go
Normal file
17
cmd/diunwebhook/main.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
|
||||
diun "awesomeProject/pkg/diunwebhook"
|
||||
)
|
||||
|
||||
func main() {
|
||||
http.HandleFunc("/webhook", diun.WebhookHandler)
|
||||
http.HandleFunc("/api/updates", diun.UpdatesHandler)
|
||||
http.Handle("/", http.FileServer(http.Dir("./static")))
|
||||
|
||||
log.Println("Listening on :8080")
|
||||
log.Fatal(http.ListenAndServe(":8080", nil))
|
||||
}
|
||||
Reference in New Issue
Block a user