https://github.com/jollytoad/groovy-in-browser
Experiment running Groovy in the browser using CheerpJ
https://github.com/jollytoad/groovy-in-browser
Last synced: about 2 months ago
JSON representation
Experiment running Groovy in the browser using CheerpJ
- Host: GitHub
- URL: https://github.com/jollytoad/groovy-in-browser
- Owner: jollytoad
- Created: 2024-06-14T09:11:47.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-14T10:03:45.000Z (11 months ago)
- Last Synced: 2024-06-15T11:13:46.338Z (11 months ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Groovy in the browser experiment
This is an experiment in running [Groovy](https://groovy-lang.org/) in the
browser using [CheerpJ](https://cheerpj.com/).## Requirements
- [Deno](https://docs.deno.com/runtime/manual/getting_started/installation)
- [Maven](https://maven.apache.org/install.html)If you don't have these immediately available, then I recommend using
[pkgx](https://pkgx.sh/) to install these locally for this project...After checking out and `cd`ing into this project:
```sh
curl -fsS https://pkgx.sh | sh
pkgx integrate
dev
```All dependencies for these tools will be downloaded and installed for use within
this project only, so you can now use `deno` and `mvn` here.## Start the server
```sh
deno task start
```Initially this will fetch all dependency jars via maven, into
`target/dependency`.Once ready, it'll dump it's URL to the console, open this in a browser.
It should now attempt to setup CheerpJ and run the example Groovy code in the
browser.See [frontend.js](./app/static/frontend.js) for this.
## Changing jar dependencies
If you want to experiment with different jars, modifiy the pom.xml and then run:
```sh
deno task jars
```you don't need to restart the server.
## Changing the Groovy code
Just edit and save [frontend.js](./app/static/frontend.js) and refresh the
browser (no restart required).