All checks were successful
Implement a stateless Go service that routes /api/v1/send_push and /api/v1/ack by platform prefix to configured backends, enabling mixed official and custom mobile clients on a single PushNotificationServer URL. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
306 B
Go
21 lines
306 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
// version is set at build time via -ldflags "-X main.version=..."
|
|
var version = "dev"
|
|
|
|
func main() {
|
|
args := os.Args[1:]
|
|
|
|
if len(args) == 0 || args[0] == "serve" {
|
|
runServer()
|
|
return
|
|
}
|
|
|
|
fmt.Fprintf(os.Stderr, "Usage: %s [serve]\n", os.Args[0])
|
|
os.Exit(1)
|
|
}
|