package main

import (
	"net/http"

	"code.secondbit.org/ducky/devices.hg"
	"code.secondbit.org/ducky/devices.hg/apiv1"
	"golang.org/x/net/context"
)

func main() {
	ctx := devices.WithStorer(context.Background(), devices.NewMemstore())

	router := apiv1.GetRouter(ctx)

	http.Handle("/", router)

	err := http.ListenAndServe(":9000", nil)
	if err != nil {
		panic(err)
	}
}
