Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single HTML deployment #1029

Open
nii236 opened this issue Feb 18, 2025 · 2 comments
Open

Single HTML deployment #1029

nii236 opened this issue Feb 18, 2025 · 2 comments

Comments

@nii236
Copy link

nii236 commented Feb 18, 2025

Hi,

One of the things I work on are HTML reports. These are completely self contained HTML files (excluding CDNs for CSS). I've been thinking about migrating these reports to go-app.

Go-app seems to generate quite a few files (wasm, js, css, html), which need to be served by either a server or an s3-compatible bucket.

Is there a way to embed all of the artifacts from go-app into a single HTML file?

I know its technically possible from this thread, to convert the wasm file to base64 then inject it into the HTML. I was wondering if go-app has functionality for the same output.

@maxence-charriere
Copy link
Owner

It is possible to generate static pages => https://go-app.dev/github-deploy

@nii236
Copy link
Author

nii236 commented Feb 18, 2025

The static pages is a list of files.

.                        # Current dir.
├── app-worker.js        # Service-worker file (Generated).
├── app.js               # Js support file (Generated).
├── index.html           # Index page (Generated from "/").
├── hello.html           # hello page (Generated from "/hello").
├── manifest.webmanifest # PWA manifest (Generated).
├── wasm_exec.js         # Wasm support file (Generated).
└── web                  # Web directory.
    └── app.wasm         # Wasm app (Manually built).

What I'm asking is a way for the peripheral files to all be embedded into a single index.html, which allows a user to open the HTML report locally without the need for a server to serve the files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants