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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ and its page API matches CheerpJ's, so existing pages can switch.
pnpm add @project516/java-web
```

Serve `node_modules/@project516/java-web/dist/` as static files, then:
Serve `node_modules/@project516/java-web/dist/` as static files (on GitHub
Pages, deploy from Actions: a `gh-pages` branch cannot hold the 120 MB
`jdk/image.jar`; on a project site, `/app/` is `user.github.io`, so files are
under `/app/<repo>/`), then:

```html
<script src="java-web.js"></script>
Expand Down
4 changes: 4 additions & 0 deletions docs/browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ next to itself, or where `cheerpjInit({ runtime: "/path/to/dist/" })` says.
typical start reads, and `jdk/javac.pack` what javac adds. A host that
compresses ranged responses still works, at the cost of one full download of
`jdk/image.jar` (about 120 MB).
- `jdk/image.jar` is over GitHub's 100 MB limit for a file in a git
repository, so a site published by pushing a `gh-pages` branch cannot hold
it. GitHub Pages deployed from Actions (`actions/upload-pages-artifact`)
serves it, Range requests included.
- The JIT compiles hot Java methods with `new Function`, so a page with a
Content Security Policy needs `'unsafe-eval'` in `script-src`. Without it,
Java still runs, only interpreted.
Expand Down
Loading