docs: update instructions for Deno
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m7s

This commit is contained in:
Dorian Niemiec 2024-12-03 07:18:43 +01:00
parent 158586f453
commit 115e630bf7

View file

@ -47,13 +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)
If you are using Deno, create the `svr.cjs` file with these contents: If you are using Deno versions older than 2.1.2, create the `svr.cjs` file with these contents:
```js ```js
require("./svr.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. 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. 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 --unstable-delect-cjs svr.js` if you're using Deno 2.1.2 or newer, or `deno run -A svr.cjs` if you're using older versions of Deno.
You will then see the message similar to this: You will then see the message similar to this:
@ -74,13 +74,13 @@ To install SVR.JS via Docker, first pull the image using `docker pull svrjs/svrj
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. 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: If you are using Deno versions older than 2.1.2, create the `svr.cjs` file with these contents:
```js ```js
require("./svr.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. 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. 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 --unstable-delect-cjs svr.js` if you're using Deno 2.1.2 or newer, or `deno run -A svr.cjs` if you're using older versions of Deno.
You will then see the message similar to this: You will then see the message similar to this: