func init() {
	defaultConfigPath := utils.GetPath([]string{"assets", "config.json"})
	flag.StringVar(&options.ConfigPath, "c", defaultConfigPath, "use '-c' option to specify the config file path")

	flag.StringVar(&options.Cloud, "cloud", utils.AWS, "use '--cloud' option to specify the cloud client to use: Vware or AWS or SoftLayer (SL)")

	flag.Parse()
}
Exemple #2
0
func main() {
	// Step1. Get Config Path
	defaultConfigPath := utils.GetPath([]string{"assets", "config.json"})
	configPath := flag.String("c", defaultConfigPath, "use '-c' option to specify the config file path")

	// Step2. Load configuration
	_, err := conf.LoadConfig(*configPath)
	if err != nil {
		panic("Error loading config file...")
	}

	// Step3. Start Server
	server := webs.CreateServer()
	server.Start()
}