Exemple #1
0
func main() {
	apiStage := sparta.NewStage("v1")
	apiGateway := sparta.NewAPIGateway("SpartaImagerAPI", apiStage)
	apiGateway.CORSEnabled = true
	funcs, err := imagerFunctions(apiGateway)
	if err == nil {
		sparta.Main("SpartaImager", "This is a sample Sparta application", funcs, apiGateway, nil)
	}
}
func main() {
	stage := sparta.NewStage("prod")
	apiGateway := sparta.NewAPIGateway("MySpartaAPI", stage)
	apiGateway.CORSEnabled = true

	stackName := "SpartaApplication"
	sparta.Main(stackName,
		"Simple Sparta application",
		spartaLambdaData(apiGateway),
		apiGateway,
		nil)
}