2019-12-02 14:31:00 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
2019-12-02 16:24:19 +00:00
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
|
2019-12-02 14:31:00 +00:00
|
|
|
"git.sr.ht/~emersion/koushin"
|
|
|
|
"github.com/labstack/echo/v4/middleware"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
2019-12-02 16:24:19 +00:00
|
|
|
if len(os.Args) != 2 {
|
|
|
|
fmt.Println("usage: koushin imaps://<host>:<port>")
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
url := os.Args[1]
|
|
|
|
|
|
|
|
e := koushin.New(url)
|
2019-12-02 14:31:00 +00:00
|
|
|
e.Use(middleware.Logger())
|
|
|
|
e.Use(middleware.Recover())
|
|
|
|
e.Logger.Fatal(e.Start(":1323"))
|
|
|
|
}
|