Add existing codebase

This commit is contained in:
Andrey Chervyakov 2021-03-13 01:43:08 +06:00
commit c23a68347b
16 changed files with 807 additions and 0 deletions

20
cmd/link/main.go Normal file
View file

@ -0,0 +1,20 @@
package main
import (
"link"
"link/database"
)
func main() {
conf := link.NewConfig()
pool := database.Pool(conf)
if err := link.Migrate(pool); err != nil {
panic(err)
}
server := link.NewServer(conf, pool)
server.Logger.Fatal(server.Start(":8080"))
}