BareRTC/cmd/BareRTC/main.go
Noah Petherbridge 8f60bdba0e Spit and polish
* Add configuration system and default public channels support
* Add support for multiple channels and DM threads with users,
  with unread badge indicators. DMs rearrange themselves by
  most recently updated on top.
* Responsive CSS to work well on mobile devices.
2023-02-05 00:53:50 -08:00

38 lines
670 B
Go

package main
import (
"flag"
"math/rand"
"time"
barertc "git.kirsle.net/apps/barertc/pkg"
"git.kirsle.net/apps/barertc/pkg/config"
"git.kirsle.net/apps/barertc/pkg/log"
)
func init() {
rand.Seed(time.Now().UnixNano())
}
func main() {
// Command line flags.
var (
debug bool
address string
)
flag.BoolVar(&debug, "debug", false, "Enable debug-level logging in the app.")
flag.StringVar(&address, "address", ":9000", "Address to listen on, like localhost:5000 or :8080")
flag.Parse()
if debug {
log.SetDebug(true)
}
// Load configuration.
config.LoadSettings()
app := barertc.NewServer()
app.Setup()
panic(app.ListenAndServe(address))
}