Skip to content

Commit 95d9d12

Browse files
Curtis J SchofieldCurtis J Schofield
authored andcommitted
update readme with doc about runtime
1 parent 2c46818 commit 95d9d12

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,23 @@ best runtime available on the system.
1919
Use the application environment (application key: `:execjs`, key: `:runtime`)
2020
to set the runtime `Execjs` uses. Alternatively, the `EXECJS_RUNTIME`
2121
environment variable can also be used to set the runtime.
22+
### Additional Runtimes
23+
24+
It is possible to define a custom runtime to specify an exact path
25+
to your runtime command:
26+
27+
```elixir
28+
defmodule ServeElmWeb.Runtime do
29+
import Execjs.Runtime
30+
31+
defruntime Node8,
32+
command: "/Users/o_o/.nvm/versions/node/v8.9.3/bin/node",
33+
runner: "node_runner.js.eex"
34+
end
35+
36+
```
37+
38+
2239

2340
## Usage
2441

0 commit comments

Comments
 (0)