Allow retrieving artists
[brackets.git] / main.go
1 package main
2
3 import (
4 "git.jacobcasper.com/brackets/env"
5 "git.jacobcasper.com/brackets/routes/artist"
6 _ "github.com/mattn/go-sqlite3"
7 "log"
8 "net/http"
9 )
10
11 func main() {
12 env, err := env.New()
13 if err != nil {
14 log.Fatal("Could not set up Env: ", err.Error())
15 }
16
17 http.HandleFunc(
18 "/artist/",
19 artist.Index(env),
20 )
21
22 http.HandleFunc(
23 "/artist/add",
24 artist.Add(env),
25 )
26
27 log.Fatal(http.ListenAndServe(":8080", nil))
28 }