Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion backend/FwLite/FwLiteWeb/FwLiteWebServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ public static WebApplication SetupAppServer(WebApplicationOptions options, Actio

app.MapStaticAssets();
app.MapRazorComponents<App>()
.AddInteractiveServerRenderMode()
.AddInteractiveServerRenderMode(endpointOptions =>
{
endpointOptions.ContentSecurityFrameAncestorsPolicy = "self http://localhost:*";
})
.AddAdditionalAssemblies(typeof(FwLiteShared._Imports).Assembly);
return app;
}
Expand Down
2 changes: 2 additions & 0 deletions backend/FwLite/FwLiteWeb/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
using FwLiteWeb;
using Microsoft.Extensions.Options;

//paratext won't let us change the working directory, and if it's not set correctly then loading js files doesn't work
Directory.SetCurrentDirectory(Path.GetDirectoryName(typeof(Program).Assembly.Location)!);

Check warning on line 6 in backend/FwLite/FwLiteWeb/Program.cs

View workflow job for this annotation

GitHub Actions / Publish FW Lite app for Linux

'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.

Check warning on line 6 in backend/FwLite/FwLiteWeb/Program.cs

View workflow job for this annotation

GitHub Actions / Publish FW Lite app for Linux

'System.Reflection.Assembly.Location.get' always returns an empty string for assemblies embedded in a single-file app. If the path to the app directory is needed, consider calling 'System.AppContext.BaseDirectory'.
Comment thread
hahn-kev marked this conversation as resolved.
var app = FwLiteWebServer.SetupAppServer(new() {Args = args});
await using (app)
{
Expand Down
9 changes: 5 additions & 4 deletions frontend/platform.bible-extension/Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,19 @@ tasks:
- npm install

package:
deps: [ build-fw-lite-web, build-viewer-component, install ]
deps: [ build-fw-lite-web, install ]
cmds:
- npm run package

run:
deps: [ build-fw-lite-web, build-viewer-component, install ]
deps: [ build-fw-lite-web, install ]
cmds:
- npm run start

build-fw-lite-web:
deps: [build-viewer]
cmds:
- dotnet publish ../../backend/FwLite/FwLiteWeb/FwLiteWeb.csproj --configuration Release --sc --output ./public/fw-lite
build-viewer-component:
build-viewer:
dir: ../viewer
cmd: pnpm run build
cmd: pnpm run build-app
Loading
Loading