first commit

This commit is contained in:
2025-08-06 10:23:12 +02:00
commit 4f291c93e5
9 changed files with 670 additions and 0 deletions

19
examples/main.go Normal file
View File

@@ -0,0 +1,19 @@
package main
import (
"git.tijl.dev/tijl/shortify"
)
func main() {
s, err := shortify.NewShortener(shortify.Config{
DataFolder: "./shortify",
CacheSize: 10000,
AccessLogSize: 10000,
})
if err != nil {
panic(err)
}
go s.ServeSocket("./data/shortify.sock")
s.ServeHTTP("0.0.0.0:3001")
}