Dear Gitlab users, due to maintenance reasons, Gitlab will not be available on Thursday 30.09.2021 from 5:00 pm to approximately 5:30 pm.

Commit e2329b35 authored by Andreas Wagner's avatar Andreas Wagner
Browse files

More negligible fixes.

parent d3bb47c4
......@@ -16,7 +16,9 @@ var Config tei2zenodo.Config
func main() {
var Config tei2zenodo.Config
conf.Configure(&Config)
log.Printf("[main/main] Config: %+v", Config)
log.Printf("Starting tei2zenodo daemon")
// log.Printf("[main/main] Config: %+v", Config)
// spew.Dump(Config)
router := routing.SetupRoutes(Config)
......
......@@ -12,6 +12,7 @@ import (
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"github.com/stephenmuss/ginerus"
"gitlab.gwdg.de/rg-mpg-de/tei2zenodo"
"gitlab.gwdg.de/rg-mpg-de/tei2zenodo/internal/pkg/github"
"gitlab.gwdg.de/rg-mpg-de/tei2zenodo/internal/pkg/t2zxml"
......@@ -20,11 +21,17 @@ import (
// SetupRoutes establishes the various API endpoints.
func SetupRoutes(conf tei2zenodo.Config) *gin.Engine {
// Switch gin to release mode
gin.SetMode(gin.ReleaseMode)
// Create a gin router with logrus router and stock recovery
// logger.Infof("Starting routing...")
router := gin.New()
router.Use(ginerus.Ginerus(), gin.Recovery(), cors.Default())
// Create default gin router with the Logger and Recovery middleware already attached
// router := gin.Default()
// Routes - one for the html/webapp, one group per API version...
router.GET("/tei2zenodo.html", func(c *gin.Context) {
page := c.DefaultQuery("p", "index")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment