docs: add a mention of Deno support and instruction how to run SVR.JS on Deno
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m9s

This commit is contained in:
Dorian Niemiec 2024-10-19 07:35:43 +02:00
parent ba96affc30
commit 24511542dd
2 changed files with 18 additions and 4 deletions

View file

@ -47,7 +47,13 @@ To install SVR.JS using _create-svrjs-server_, first install the utility using `
- `create-svrjs-server latest` - Latest SVR.JS version - `create-svrjs-server latest` - Latest SVR.JS version
- `create-svrjs-server 3.6.1` - SVR.JS 3.6.1 (replace 3.6.1 with your desired version) - `create-svrjs-server 3.6.1` - SVR.JS 3.6.1 (replace 3.6.1 with your desired version)
After downloading and installing SVR.JS to your working directory, run `node svr.js` for SVR.JS 3.x or `node svr_new.js` for earlier versions or `bun run svr.js` if you're using Bun instead of Node.JS. If you are using Deno, create the `svr.cjs` file with these contents:
```js
require("./svr.js");
```
Repeat the process with `logviewer.cjs`, `loghighlight.cjs`, and `svrpasswd.cjs` files, replacing `svr.js` with corresponding script names with `.js` extension.
After downloading and installing SVR.JS to your working directory, run `node svr.js` for SVR.JS 3.x or `node svr_new.js` for earlier versions or `bun run svr.js` if you're using Bun instead of Node.JS, or `deno run -A svr.cjs` if you're using Deno instead of Node.JS.
You will then see the message similar to this: You will then see the message similar to this:
@ -66,7 +72,15 @@ To install SVR.JS via Docker, first pull the image using `docker pull svrjs/svrj
## Manual installation ## Manual installation
To install SVR.JS manually, first unpack your SVR.JS zip archive you downloaded from SVR.JS download page. Then change your working directory to one containing SVR.JS script stub, and run `node svr.js` for SVR.JS 3.x or `node svr_new.js` for earlier versions or `bun run svr.js` if you're using Bun instead of Node.JS. To install SVR.JS manually, first unpack your SVR.JS zip archive you downloaded from SVR.JS download page. Then change your working directory to one containing SVR.JS script stub.
If you are using Deno, create the `svr.cjs` file with these contents:
```js
require("./svr.js");
```
Repeat the process with `logviewer.cjs`, `loghighlight.cjs`, and `svrpasswd.cjs` files, replacing `svr.js` with corresponding script names with `.js` extension.
Run `node svr.js` for SVR.JS 3.x or `node svr_new.js` for earlier versions or `bun run svr.js` if you're using Bun instead of Node.JS, or `deno run -A svr.cjs` if you're using Deno instead of Node.JS.
You will then see the message similar to this: You will then see the message similar to this:

View file

@ -4,8 +4,8 @@
### Minimum ### Minimum
- Node.JS 8.4.0 or newer (SVR.JS 3.4.x and earlier), Node.JS 10.0.0 or newer (SVR.JS 3.5.x and later) / Latest version of Bun (experimental). - Node.JS 8.4.0 or newer (SVR.JS 3.4.x and earlier), Node.JS 10.0.0 or newer (SVR.JS 3.5.x and later) / Latest version of Bun (experimental) / Latest version of Deno (experimental).
- OS supported by Node.JS/Bun. - OS supported by Node.JS/Bun/Deno.
### Recommended ### Recommended