first commit
This commit is contained in:
19
examples/main.go
Normal file
19
examples/main.go
Normal 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")
|
||||
}
|
||||
Reference in New Issue
Block a user