Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768package main
import ( "os"
_ "github.com/joho/godotenv/autoload"
logging "github.com/ipfs/go-log" "github.com/urfave/cli/v2")
var log = logging.Logger("embedr")
func init() { logging.SetAllLoggers(logging.LevelDebug) //logging.SetAllLoggers(logging.LevelWarn)}
func main() { run(os.Args)}
func run(args []string) {
app := cli.App{ Name: "embedr", Usage: "web server for embed.bsky.app post embeds", }
app.Commands = []*cli.Command{ &cli.Command{ Name: "serve", Usage: "run the server", Action: serve, Flags: []cli.Flag{ &cli.StringFlag{ Name: "appview-host", Usage: "method, hostname, and port of PDS instance", Value: "https://api.blacksky.community", EnvVars: []string{"ATP_APPVIEW_HOST"}, }, &cli.StringFlag{ Name: "http-address", Usage: "Specify the local IP/port to bind to", Required: false, Value: ":8100", EnvVars: []string{"HTTP_ADDRESS"}, }, &cli.StringFlag{ Name: "metrics-address", Usage: "Specify the local IP/port to bind the metrics server to", Required: false, Value: ":9090", EnvVars: []string{"METRICS_HTTP_ADDRESS"}, }, &cli.BoolFlag{ Name: "debug", Usage: "Enable debug mode", Value: false, Required: false, EnvVars: []string{"DEBUG"}, }, }, }, } app.RunAndExitOnError()}