From 115e630bf7ef3c5e05be7b89a216fdb34536647c Mon Sep 17 00:00:00 2001 From: Dorian Niemiec Date: Tue, 3 Dec 2024 07:18:43 +0100 Subject: [PATCH] docs: update instructions for Deno --- pages/docs/getting-started/installation.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pages/docs/getting-started/installation.md b/pages/docs/getting-started/installation.md index 39445aa..193a0ff 100644 --- a/pages/docs/getting-started/installation.md +++ b/pages/docs/getting-started/installation.md @@ -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 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 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. +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: @@ -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. -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 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. +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: