A comic book database manager and API server. Designed to be compatible with ComicStreamer's API while adding new useful and secure features.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
526 B

package web
import (
//This is where the REST API stuff will go
//Starts the API server and registers handlers
func Start(c *config.ApiConfig) {
//TODO: register handlers
router := gin.Default()
router.GET("/", rootHandler)
router.GET("/dbinfo", dbInfoHandler)
router.GET("/version", versionHandler)
router.RunTLS(c.HttpPort, "./test.pem", "./test.key")
func rootHandler(c *gin.Context) {
c.String(http.StatusOK, "hi")