embed and build.
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"github.com/gorilla/websocket"
|
||||
"github.com/labstack/echo/v4"
|
||||
"github.com/labstack/echo/v4/middleware"
|
||||
"io/fs"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
@@ -265,6 +266,13 @@ func New(addr string) (lucifer3.Service, error) {
|
||||
return c.JSON(200, input)
|
||||
})
|
||||
|
||||
subFS, err := fs.Sub(lucifer3.FrontendFS, "frontend/build")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
e.StaticFS("/", subFS)
|
||||
|
||||
listener, err := net.Listen("tcp", addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user