-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
📝 Update examples/node-plugin/README.md [skip ci]
- Loading branch information
Showing
1 changed file
with
7 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,9 +29,8 @@ $ git clone --depth 1 [email protected]:SoftInstigate/restheart.git | |
(here we use the brilliant sdkman) | ||
|
||
```bash | ||
$ sdk install java 17.0.9-graal | ||
$ sdk use java 17.0.9-graal | ||
$ gu install nodejs | ||
$ sdk install java 21.0.2-graalce | ||
$ sdk use java 21.0.2-graalce | ||
``` | ||
|
||
## Get the script `restheart.js` | ||
|
@@ -43,14 +42,16 @@ $ curl https://raw.githubusercontent.com/SoftInstigate/restheart/polyglot/src/js | |
|
||
Where <RH_HOME> is the RESTHeart installation directory. | ||
|
||
## Install GraalVM Node | ||
|
||
Check [Getting Started with Node.js](https://www.graalvm.org/latest/reference-manual/js/NodeJS/#getting-started-with-nodejs) in GraalVM documentation. | ||
|
||
## Run RESTHeart on Node | ||
|
||
```bash | ||
$ $(sdk home java 17.0.9-graal)/bin/node --jvm --vm.cp=restheart.jar restheart.js | ||
$ <graalvm_install_dir>/bin/node --jvm --vm.cp=restheart.jar restheart.js | ||
``` | ||
|
||
(we use `sdk home` to make sure to use the GraalVM's node implementation) | ||
|
||
## Deploy the example Node Plugin | ||
|
||
Just copy the directory `node-plugin` into `<RH_HOME>/plugins`: | ||
|