Re-struct pkg/api, pkg/database

This commit is contained in:
2021-12-07 00:19:05 +08:00
parent 546385a484
commit 83f2b76cbc
25 changed files with 1350 additions and 1192 deletions

11
pkg/api/api_test.go Normal file
View File

@@ -0,0 +1,11 @@
package api
import "testing"
func TestAPI(t *testing.T) {
api, err := NewAPI("/tmp/test.sqlite3", ":8080")
if err != nil {
t.Fatal(err.Error())
}
t.Fatal(api.Server.ListenAndServe())
}