Serve compliance-portal instead of trust
Embed and build @probo/compliance-portal for the /trust path and custom-domain SPA so production ships the v2 portal. Keep apps/trust in the repo for local use on port 5175; portal takes 5174. Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
@@ -28,7 +28,7 @@ import (
|
||||
"io/fs"
|
||||
"net/http"
|
||||
|
||||
truststatics "go.probo.inc/probo/apps/trust"
|
||||
complianceportalstatics "go.probo.inc/probo/apps/compliance-portal"
|
||||
"go.probo.inc/probo/pkg/server/statichandler"
|
||||
)
|
||||
|
||||
@@ -59,7 +59,7 @@ func NewServer(headDataFunc HeadDataFunc) (*Server, error) {
|
||||
}
|
||||
|
||||
spaServer, err := statichandler.NewServer(
|
||||
truststatics.StaticFiles,
|
||||
complianceportalstatics.StaticFiles,
|
||||
"dist",
|
||||
gzipOptions,
|
||||
statichandler.WithFileRenderer("/index.html", renderer),
|
||||
@@ -72,7 +72,7 @@ func NewServer(headDataFunc HeadDataFunc) (*Server, error) {
|
||||
}
|
||||
|
||||
func buildIndexRenderer(headDataFunc HeadDataFunc) (statichandler.FileRenderer, error) {
|
||||
subFS, err := fs.Sub(truststatics.StaticFiles, "dist")
|
||||
subFS, err := fs.Sub(complianceportalstatics.StaticFiles, "dist")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("cannot open dist: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user