// Package main provide one-line integration with letsencrypt.org
package main

import (
	"github.com/kataras/iris"
	"github.com/kataras/iris/context"
)

func main() {
	app := iris.New()

	app.Get("/", func(ctx context.Context) {
		ctx.Writef("Hello from SECURE SERVER!")
	})

	app.Get("/test2", func(ctx context.Context) {
		ctx.Writef("Welcome to secure server from /test2!")
	})

	app.Get("/redirect", func(ctx context.Context) {
		ctx.Redirect("/test2")
	})

	// NOTE: This may not work on local addresses like this,
	// use it on a real domain, because
	// it uses the 	"golang.org/x/crypto/acme/autocert" package.
	app.Run(iris.AutoTLS("localhost:443"))
}

// Package main provide one-line integration with letsencrypt.org
package main

import (
	"github.com/kataras/iris"
	"github.com/kataras/iris/context"
)

func main() {
	app := iris.New()

	app.Get("/", func(ctx context.Context) {
		ctx.Writef("Hello from SECURE SERVER!")
	})

	app.Get("/test2", func(ctx context.Context) {
		ctx.Writef("Welcome to secure server from /test2!")
	})

	app.Get("/redirect", func(ctx context.Context) {
		ctx.Redirect("/test2")
	})

	// NOTE: This will not work on domains like this,
	// use real whitelisted domain(or domains split by whitespaces)
	// and a non-public e-mail instead.
	app.Run(iris.AutoTLS(":443", "example.com", "mail@example.com"))
}

Update `iris.AutoTLS` example, read description.
Update `iris.AutoTLS` example, read description.

Iris devs should declare all the information now, there is no option to "leave something out" anymore, it's for your own good. Version is not changed yet, giving you time to see that changelog and do the necessary changes to your codebase, it will written to HISTORY.md too of course.

Before:
app.Run(iris.AutoTLS(":443"))

Now:
app.Run(iris.AutoTLS(":443", "example.com", "mail@example.com")

Commit Change: https://github.com/kataras/iris/commit/f7b655f145b011e758cf06fb8adef871d9c18fde [formerly f5314a8c1f8303d7216481d05129eb8a62766e14]

Happy weekend!


Former-commit-id: bf974dc486d05ff008c9ed13aaf96e716b1e55c6