feat(backend): switch to libvips for avatar resizing

This commit is contained in:
Sam 2023-05-11 00:59:40 +02:00
parent 9c4e29e64f
commit 1319366637
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
4 changed files with 30 additions and 25 deletions

View file

@ -10,6 +10,7 @@ import (
"codeberg.org/u1f320/pronouns.cc/backend/log"
"codeberg.org/u1f320/pronouns.cc/backend/server"
"github.com/davidbyttow/govips/v2/vips"
"github.com/go-chi/render"
_ "github.com/joho/godotenv/autoload"
"github.com/urfave/cli/v2"
@ -22,6 +23,9 @@ var Command = &cli.Command{
}
func run(c *cli.Context) error {
vips.Startup(nil)
defer vips.Shutdown()
port := ":" + os.Getenv("PORT")
s, err := server.New()