Skip to content

Commit

Permalink
📝 Update examples/node-plugin/README.md [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
ujibang committed Nov 18, 2024
1 parent 6751216 commit 3114cef
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions examples/node-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`:
Expand Down

0 comments on commit 3114cef

Please sign in to comment.