mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 00:47:09 +00:00
chore(display): add ai generated pdf.js integration (#58)
Co-authored-by: E44 <129310925+programmer-44@users.noreply.github.com> Reviewed-on: https://codeberg.org/PLG-Development/PLG-MuDiCS/pulls/58
This commit is contained in:
@@ -16,12 +16,20 @@ import (
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
|
||||
"plg-mudics/display/browser"
|
||||
"plg-mudics/display/internal/pdfjs"
|
||||
"plg-mudics/display/pkg"
|
||||
)
|
||||
|
||||
func StartWebServer(port string) {
|
||||
e := echo.New()
|
||||
|
||||
pdfJSGroup := e.Group("/static/pdfjs")
|
||||
pdfJSGroup.Use(middleware.CORS())
|
||||
pdfJSGroup.StaticFS(
|
||||
"/",
|
||||
echo.MustSubFS(pdfjs.Files, "node_modules/pdfjs-dist/build"),
|
||||
)
|
||||
|
||||
apiGroup := e.Group("/api")
|
||||
apiGroup.Use(middleware.CORS())
|
||||
apiGroup.GET("/ping", pingRoute)
|
||||
|
||||
Reference in New Issue
Block a user