create support for releases, artists, tracks, and credits
Signed-off-by: ari melody <ari@arimelody.me>
This commit is contained in:
parent
442889340c
commit
9329aa9f60
19 changed files with 252 additions and 37 deletions
10
main.go
10
main.go
|
@ -15,7 +15,7 @@ import (
|
|||
musicView "arimelody.me/arimelody.me/music/view"
|
||||
|
||||
"github.com/jmoiron/sqlx"
|
||||
_ "github.com/lib/pq"
|
||||
_ "github.com/lib/pq"
|
||||
)
|
||||
|
||||
const DEFAULT_PORT int = 8080
|
||||
|
@ -49,6 +49,14 @@ func main() {
|
|||
}
|
||||
fmt.Printf("%d releases loaded successfully.\n", len(global.Releases))
|
||||
|
||||
// pull track data from DB
|
||||
global.Tracks, err = musicController.PullAllTracks(global.DB)
|
||||
if err != nil {
|
||||
fmt.Printf("Failed to pull tracks from database: %v\n", err);
|
||||
panic(1)
|
||||
}
|
||||
fmt.Printf("%d tracks loaded successfully.\n", len(global.Tracks))
|
||||
|
||||
// start the web server!
|
||||
mux := createServeMux()
|
||||
port := DEFAULT_PORT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue