aboutsummaryrefslogblamecommitdiff
path: root/cmd/koushin/main.go
blob: 6e364cb9a07c64df458e27341e94d8e18b061a94 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11


            


             




                                                







                                                                   



                                        
package main

import (
	"fmt"
	"os"

	"git.sr.ht/~emersion/koushin"
	"github.com/labstack/echo/v4/middleware"
)

func main() {
	if len(os.Args) != 2 {
		fmt.Println("usage: koushin imaps://<host>:<port>")
		return
	}

	url := os.Args[1]

	e := koushin.New(url)
	e.Use(middleware.Logger())
	e.Use(middleware.Recover())
	e.Logger.Fatal(e.Start(":1323"))
}