package main

import (
	"log"
	"net/http"

	_ "github.com/go-sql-driver/mysql"
	_ "github.com/taosdata/driver-go/v3/taosWS"

	"lingniu/vehicle-data-platform/apps/api/internal/app"
	"lingniu/vehicle-data-platform/apps/api/internal/config"
)

func main() {
	cfg := config.Load()
	log.Printf("vehicle data platform listening on %s", cfg.HTTPAddr)
	if err := http.ListenAndServe(cfg.HTTPAddr, app.NewServer(cfg)); err != nil {
		log.Fatal(err)
	}
}
