20 lines
310 B
Go
20 lines
310 B
Go
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")
|
|
}
|