Exemple #1
0
func main() {
	flag.Parse()

	if *database != "" {
		if err := UserIndex.fileLoad(*database); err != nil {
			log.Println(err.Error())
		}

		go func() {
			for {
				dur, _ := time.ParseDuration("5m")
				time.Sleep(dur)

				if err := UserIndex.fileSave(*database); err != nil {
					log.Println(err.Error())
				}
			}
		}()
	}

	if *startRepl {
		go alexa.Run(Applications, *port)
		repl()
	} else {
		alexa.Run(Applications, *port)
	}
}
Exemple #2
0
func main() {
	rand.Seed(time.Now().UTC().UnixNano())
	alexa.Run(Applications, "3000")
}
Exemple #3
0
func main() {
	alexa.Run(Applications, "3000")
}