diff --git a/app/(root)/page.tsx b/app/(root)/page.tsx index f5fe0a7..6111f4d 100644 --- a/app/(root)/page.tsx +++ b/app/(root)/page.tsx @@ -9,14 +9,14 @@ import { Metadata } from "next"; // baseURL [ENV] export const metadata: Metadata = { - title: "SVR.JS - a web server running on Node.JS", + title: "SVR.JS - a web server running on Node.js", description: - "Host your websites with SVR.JS - a free, open-source, scalable, and secure web server built on Node.JS. Supports JavaScript and PHP applications.", + "Host your websites with SVR.JS - a free, open-source, scalable, and secure web server built on Node.js. Supports JavaScript and PHP applications.", alternates: { canonical: `${process.env.NEXT_PUBLIC_WEBSITE_URL}` }, openGraph: { - title: "SVR.JS - a web server running on Node.JS", + title: "SVR.JS - a web server running on Node.js", description: - "Host your websites with SVR.JS - a free, open-source, scalable, and secure web server built on Node.JS. Supports JavaScript and PHP applications.", + "Host your websites with SVR.JS - a free, open-source, scalable, and secure web server built on Node.js. Supports JavaScript and PHP applications.", url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}`, type: "website", images: [ @@ -24,16 +24,16 @@ export const metadata: Metadata = { url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, width: 800, height: 600, - alt: "SVR.JS - a web server running on Node.JS" + alt: "SVR.JS - a web server running on Node.js" } ] }, twitter: { card: "summary_large_image", site: "@SVR_JS", - title: "SVR.JS - a web server running on Node.JS", + title: "SVR.JS - a web server running on Node.js", description: - "Host your websites with SVR.JS - a free, open-source, scalable, and secure web server built on Node.JS. Supports JavaScript and PHP applications.", + "Host your websites with SVR.JS - a free, open-source, scalable, and secure web server built on Node.js. Supports JavaScript and PHP applications.", images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`], creator: "@SVR_JS" } diff --git a/app/layout.tsx b/app/layout.tsx index c4c6bd1..3e1003b 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -11,7 +11,7 @@ const poppins = Poppins({ }); export const metadata: Metadata = { - title: "SVR.JS - a web server running on Node.JS" + title: "SVR.JS - a web server running on Node.js" }; export default function RootLayout({ diff --git a/components/shared/About.tsx b/components/shared/About.tsx index c4d4bb0..5870686 100644 --- a/components/shared/About.tsx +++ b/components/shared/About.tsx @@ -24,7 +24,7 @@ const About = () => {

- SVR.JS is a web server that runs on top of Node.JS, enabling + SVR.JS is a web server that runs on top of Node.js, enabling server-side JavaScript on webpages. SVR.JS also has an integrated log viewer, log highlighter, and user management tool. You can host a webpage using SVR.JS, run server-side diff --git a/components/shared/Hero.tsx b/components/shared/Hero.tsx index 4fc78c8..190e545 100644 --- a/components/shared/Hero.tsx +++ b/components/shared/Hero.tsx @@ -79,7 +79,7 @@ const Hero = () => {

Host reliably and securely, and scale effortlessly with SVR.JS, an - open-source and configurable web server running on Node.JS that's + open-source and configurable web server running on Node.js that's designed to handle high loads.

diff --git a/constants/index.tsx b/constants/index.tsx index 195d158..080257f 100644 --- a/constants/index.tsx +++ b/constants/index.tsx @@ -76,13 +76,13 @@ export const Features = [ icon: , title: "Free as in freedom", description: - "You don't need to worry about proprietary malware, counterfeit software, crashes from non-genuine versions, or Big Tech backdoors. SVR.JS is open-source under the MIT license, running on Node.JS (also MIT). Contribute to SVR.JS via our Git repository!" + "You don't need to worry about proprietary malware, counterfeit software, crashes from non-genuine versions, or Big Tech backdoors. SVR.JS is open-source under the MIT license, running on Node.js (also MIT). Contribute to SVR.JS via our Git repository!" }, { icon: , title: "Scalable", description: - "SVR.JS runs on Node.JS or Bun, which are JavaScript runtimes utilizing event-driven infrastructure for efficient handling of I/O operations. It also uses clustering by default to withstand high request loads and ensure server stability." + "SVR.JS runs on Node.js or Bun, which are JavaScript runtimes utilizing event-driven infrastructure for efficient handling of I/O operations. It also uses clustering by default to withstand high request loads and ensure server stability." }, { icon: , @@ -110,13 +110,13 @@ export const questions = [ key: "item-2", question: "What is SVR.JS?", answer: - "SVR.JS is web server software running on Node.JS that can host both static and dynamic content. With additional mods, SVR.JS can be used for different types of dynamic content and can even be used as a forward or reverse proxy. SVR.JS is licensed under a permissive MIT/X11 license" + "SVR.JS is web server software running on Node.js that can host both static and dynamic content. With additional mods, SVR.JS can be used for different types of dynamic content and can even be used as a forward or reverse proxy. SVR.JS is licensed under a permissive MIT/X11 license" }, { key: "item-3", question: "How was SVR.JS created?", answer: - "Someone in 2018 wanted to create a website, but he didn't know about setting up popular web server software like Apache httpd, NGINX, or IIS... So he created his own web server in Node.JS to serve his website! And he saved it in a file called svr.js. Since then, this web server has been gradually turned from a web server intended for one website into a general-purpose web server, which is what SVR.JS is today!" + "Someone in 2018 wanted to create a website, but he didn't know about setting up popular web server software like Apache httpd, NGINX, or IIS... So he created his own web server in Node.js to serve his website! And he saved it in a file called svr.js. Since then, this web server has been gradually turned from a web server intended for one website into a general-purpose web server, which is what SVR.JS is today!" }, { key: "item-4", @@ -126,9 +126,9 @@ export const questions = [ }, { key: "item-5", - question: "What is Node.JS?", + question: "What is Node.js?", answer: - "Node.JS is an asynchronous event-driven JavaScript runtime built on Chromium's V8 engine. Node.JS is designed to build scalable network applications." + "Node.js is an asynchronous event-driven JavaScript runtime built on Chromium's V8 engine. Node.js is designed to build scalable network applications." }, { key: "item-6", diff --git a/pages/docs/api/svrjs-api-legacy.md b/pages/docs/api/svrjs-api-legacy.md index 77df4f7..af5a91b 100644 --- a/pages/docs/api/svrjs-api-legacy.md +++ b/pages/docs/api/svrjs-api-legacy.md @@ -4,7 +4,7 @@ title: SVR.JS API (.tar.gz mods and server-side JavaScript) # SVR.JS API (_.tar.gz_ mods and server-side JavaScript) -SVR.JS has its API for both _.tar.gz_ mods and server-side JavaScript that expands its functionality. SVR.JS API extends vanilla Node.JS HTTP API. +SVR.JS has its API for both _.tar.gz_ mods and server-side JavaScript that expands its functionality. SVR.JS API extends vanilla Node.js HTTP API. ## Error handling @@ -110,7 +110,7 @@ SVR.JS applies mods for request URLs beginning with "_http://_" or with "_https: ### _req_ -_req_ object is almost same, as _req_ object in Node.JS +_req_ object is almost same, as _req_ object in Node.js Differences: @@ -120,7 +120,7 @@ Differences: ### _res_ -_res_ object is almost same, as _res_ object in Node.JS +_res_ object is almost same, as _res_ object in Node.js Differences: @@ -382,19 +382,19 @@ if (!res.writeHead) { _Added in SVR.JS 3.4.21, 3.7.0_ -_req_ object is the same, as _req_ object in Node.JS +_req_ object is the same, as _req_ object in Node.js ### _socket_ _Added in SVR.JS 3.4.21, 3.7.0_ -_socket_ object is the same, as _socket_ object in Node.JS +_socket_ object is the same, as _socket_ object in Node.js ### _head_ _Added in SVR.JS 3.4.21, 3.7.0_ -_head_ object is the same, as _head_ object in Node.JS +_head_ object is the same, as _head_ object in Node.js ### _configJSON_ diff --git a/pages/docs/api/svrjs-api.md b/pages/docs/api/svrjs-api.md index 0d5821e..303aaf9 100644 --- a/pages/docs/api/svrjs-api.md +++ b/pages/docs/api/svrjs-api.md @@ -4,7 +4,7 @@ title: SVR.JS API (.js mods) # SVR.JS API (_.js_ mods) -SVR.JS has its API for _.js_ mods that expands its functionality. SVR.JS API extends vanilla Node.JS HTTP API. +SVR.JS has its API for _.js_ mods that expands its functionality. SVR.JS API extends vanilla Node.js HTTP API. ## Error handling @@ -115,7 +115,7 @@ SVR.JS applies mods for request URLs beginning with "_http://_" or with "_https: _Added in SVR.JS 4.0.0_ -_req_ object is almost same, as _req_ object in Node.JS +_req_ object is almost same, as _req_ object in Node.js ### _req.socket.realRemoteAddress_ @@ -190,7 +190,7 @@ Rewrites the request URL to the _rewrittenURL_ parameter. Also invokes the URL s _Added in SVR.JS 4.0.0_ -_res_ object is almost same, as _res_ object in Node.JS +_res_ object is almost same, as _res_ object in Node.js ### _res.socket.realRemoteAddress_ @@ -232,7 +232,7 @@ Parameters: Returns: _res_ property (in SVR.JS 4.5.0 and later). -The difference between _res.writeHead_ in Node.JS, and in SVR.JS is that in SVR.JS it writes into server log, doesn't invoke a warning about unused status code string, and if called multiple times will emit a warning, instead of throwing an error, which could crash SVR.JS. +The difference between _res.writeHead_ in Node.js, and in SVR.JS is that in SVR.JS it writes into server log, doesn't invoke a warning about unused status code string, and if called multiple times will emit a warning, instead of throwing an error, which could crash SVR.JS. ### _res.setHeader(name, value)_ @@ -243,7 +243,7 @@ Parameters: - _name_ - the response header name (_String_) - _value_ - the response header value (optional; _String_ or _Array_) -The difference between _res.setHeader_ in Node.JS, and in SVR.JS is that in SVR.JS it doesn't invoke a warning about HTTP/1.x headers being not allowed in HTTP/2. +The difference between _res.setHeader_ in Node.js, and in SVR.JS is that in SVR.JS it doesn't invoke a warning about HTTP/1.x headers being not allowed in HTTP/2. Custom headers defined in _config.json_ are set by default. @@ -413,19 +413,19 @@ Invokes next SVR.JS mod callback, SVR.JS server-side JavaScript callback or main _Added in SVR.JS 4.0.0_ -_req_ object is the same, as _req_ object in Node.JS +_req_ object is the same, as _req_ object in Node.js ### _socket_ _Added in SVR.JS 4.0.0_ -_socket_ object is the same, as _socket_ object in Node.JS +_socket_ object is the same, as _socket_ object in Node.js ### _head_ _Added in SVR.JS 4.0.0_ -_head_ object is the same, as _head_ object in Node.JS +_head_ object is the same, as _head_ object in Node.js ### _logFacilities_ diff --git a/pages/docs/config/client-secure.md b/pages/docs/config/client-secure.md index ed5d15e..ea48915 100644 --- a/pages/docs/config/client-secure.md +++ b/pages/docs/config/client-secure.md @@ -4,4 +4,4 @@ title: Client-initiated secure renegotiation # Client-initiated secure renegotiation -Client-initiated secure renegotiation may pose DoS risks. However, Node.JS (JS runtime on which SVR.JS is running on) has built-in protection against DoS attacks caused by client-initiated secure renegotiation. Such attacks can be detected by looking for _ERR_TLS_SESSION_ATTACK_ errors in server log. +Client-initiated secure renegotiation may pose DoS risks. However, Node.js (JS runtime on which SVR.JS is running on) has built-in protection against DoS attacks caused by client-initiated secure renegotiation. Such attacks can be detected by looking for _ERR_TLS_SESSION_ATTACK_ errors in server log. diff --git a/pages/docs/config/configuration.md b/pages/docs/config/configuration.md index 612e92f..e9dd542 100644 --- a/pages/docs/config/configuration.md +++ b/pages/docs/config/configuration.md @@ -42,7 +42,7 @@ The _config.json_ file contains various properties that you can customize to con - _rejectUnauthorizedClientCertificates_ (Boolean, SVR.JS 3.14.0 or newer) - Option to disable verification of client certificates. - _cipherSuite_ (String, SVR.JS 3.14.0 or newer) - - Specification of cipher suites, replacing the default. For more information, see [Node.JS documentation](https://nodejs.org/docs/latest/api/tls.html#modifying-the-default-tls-cipher-suite). + - Specification of cipher suites, replacing the default. For more information, see [Node.js documentation](https://nodejs.org/docs/latest/api/tls.html#modifying-the-default-tls-cipher-suite). - _ecdhCurve_ (String, SVR.JS 3.14.0 or newer) - Specification of ECDH curves, for example `P-521:P-384:P-256`. Set the parameter to `auto` to select the curve automatically. You can use `openssl ecparam -list_curves` command to obtain available ECDH curves. - _signatureAlgorithms_ (String, SVR.JS 3.14.0 or newer) @@ -105,7 +105,7 @@ The _config.json_ file contains various properties that you can customize to con - _customHeaders_ (Object, SVR.JS 3.0.0 or newer) - Custom HTTP headers (configured as a JavaScript object) with a _{path}_ template representing the request path (after URL rewriting). - _http2Settings_ (Object, SVR.JS 3.14.0 or newer) - - HTTP/2 protocol settings object. See [Node.JS documentation](https://nodejs.org/docs/latest/api/http2.html#settings-object) for more information. + - HTTP/2 protocol settings object. See [Node.js documentation](https://nodejs.org/docs/latest/api/http2.html#settings-object) for more information. - _headerTableSize_: Maximum number of bytes used for header compression. Minimum value is 0. Maximum value is 232-1. Default is 4096 (Number, SVR.JS 3.14.0 or newer). - _enablePush_: Option to enable HTTP/2 Push Streams. It is enabled by default (Boolean, SVR.JS 3.14.0 or newer). - _initialWindowSize_: Sender's initial window size in bytes for stream-level flow control. Minimum value is 0. Maximum value is 232-1. Default is 65535 (Number, SVR.JS 3.14.0 or newer). @@ -114,7 +114,7 @@ The _config.json_ file contains various properties that you can customize to con - _maxHeaderListSize_: Maximum size (uncompressed octets) of acceptable header list. Minimum value is 0. Maximum value is 232-1. Default is 65535 (Number, SVR.JS 3.14.0 or newer). - _maxHeaderSize_: Alias for _maxHeaderListSize_ (Number, SVR.JS 3.14.0 or newer). - _enableConnectProtocol_: Option to enable the "Extended Connect Protocol" defined by RFC 8441 (Number, SVR.JS 3.14.0 or newer). - - _customSettings_: Additional settings not implemented yet in Node.JS and its underlying libraries. Object key defines the numeric value of the settings type (as defined in the "HTTP/2 SETTINGS" registry established by RFC 7540). Object values define actual numeric value of the settings. Settings types should be greater than 6 and less than 216-1. Values should be in range from 0 to 232-1. Currently you can specify up to 10 custom settings (Object, SVR.JS 3.14.0 or newer). + - _customSettings_: Additional settings not implemented yet in Node.js and its underlying libraries. Object key defines the numeric value of the settings type (as defined in the "HTTP/2 SETTINGS" registry established by RFC 7540). Object values define actual numeric value of the settings. Settings types should be greater than 6 and less than 216-1. Values should be in range from 0 to 232-1. Currently you can specify up to 10 custom settings (Object, SVR.JS 3.14.0 or newer). - _enableIncludingHeadAndFootInHTML_ (Boolean, SVR.JS 4.3.0 or newer) - Option to enable including custom head and foot in files with _.html_ extension. @@ -123,7 +123,7 @@ The _config.json_ file contains various properties that you can customize to con - _blacklist_ (Array of Strings) - Block list of IP addresses and CIDR ranges. - _disableServerSideScriptExpose_ (Boolean, SVR.JS 3.0.0 or newer) - - Option to disable exposing SVR.JS script, server-side JavaScript, SVR.JS mods, and Node.JS modules. **It's strongly recommended to set this property to _true_ if you're using SVR.JS server-side JavaScript.** If you want to additionally prevent fingerprinting SVR.JS by accessing _/serverSideScript.js_, you can add URL rewrite rule, that defines rewriting of _/serverSideScript.js_ to a non-existent page. + - Option to disable exposing SVR.JS script, server-side JavaScript, SVR.JS mods, and Node.js modules. **It's strongly recommended to set this property to _true_ if you're using SVR.JS server-side JavaScript.** If you want to additionally prevent fingerprinting SVR.JS by accessing _/serverSideScript.js_, you can add URL rewrite rule, that defines rewriting of _/serverSideScript.js_ to a non-existent page. - _enableRemoteLogBrowsing_ (Boolean, SVR.JS 3.0.0 or newer) - Option to enable browsing server logs from an HTTP client. Applicable only when you're not using custom web root. **It's not recommended to enable this, because it provides valuable information for attackerss, unless you're protecting _log_ folder with HTTP authentication.** - _exposeServerVersion_ (Boolean) diff --git a/pages/docs/config/custom-error.md b/pages/docs/config/custom-error.md index 45406dd..d49b48a 100644 --- a/pages/docs/config/custom-error.md +++ b/pages/docs/config/custom-error.md @@ -12,5 +12,5 @@ When designing custom error pages, you can make use of the following placeholder - _{errorDesc}_ - Displays a longer description of the server error. - _{stack}_ - Displays the error stack, which is equivalent to the _Error.stack_ property in JavaScript. - _{path}_ - Shows the path of the page that caused the error. -- _{server}_ - Displays the server version string along with the hostname. For example, "_SVR.JS/3.9.6 (Linux; Node.JS/v12.22.12) on 127.0.0.1:8080_" or simply "_SVR.JS on svrjs.org_". +- _{server}_ - Displays the server version string along with the hostname. For example, "_SVR.JS/3.9.6 (Linux; Node.js/v12.22.12) on 127.0.0.1:8080_" or simply "_SVR.JS on svrjs.org_". - _{contact}_ - Displays the contact information of the server administrator, which can be set using the _serverAdministratorEmail_ property in _config.json_. diff --git a/pages/docs/getting-started/features.md b/pages/docs/getting-started/features.md index 4a08d59..1196b9f 100644 --- a/pages/docs/getting-started/features.md +++ b/pages/docs/getting-started/features.md @@ -27,7 +27,7 @@ title: Features - Expandability via server-side JavaScript and mods - Ability to serve non-standard error pages - URL rewriting engine -- Event driven architecture powered by Node.JS, along with clustering. +- Event driven architecture powered by Node.js, along with clustering. ## Compression and content delivery diff --git a/pages/docs/getting-started/installation.md b/pages/docs/getting-started/installation.md index 9016519..0ffd071 100644 --- a/pages/docs/getting-started/installation.md +++ b/pages/docs/getting-started/installation.md @@ -6,7 +6,7 @@ title: Installation ## Using SVR.JS installer for GNU/Linux (installer packages made in April 5, 2024 and later) -The command for SVR.JS installation is available in [the SVR.JS home page](https://svrjs.org). First off, press the _GNU/Linux_ button, then copy the command below the tab into the terminal. The command looks something like this: `sudo bash -c "$(curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20250105.sh)"`. After starting the installer, you will be prompted to select the type of SVR.JS installation. After selecting the type, SVR.JS installer will install Node.JS, SVR.JS and create SVR.JS service. During installation, you may be prompted for the installation of dependencies. Once the installation is done, the server is started at _http://localhost_. +The command for SVR.JS installation is available in [the SVR.JS home page](https://svrjs.org). First off, press the _GNU/Linux_ button, then copy the command below the tab into the terminal. The command looks something like this: `sudo bash -c "$(curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20250105.sh)"`. After starting the installer, you will be prompted to select the type of SVR.JS installation. After selecting the type, SVR.JS installer will install Node.js, SVR.JS and create SVR.JS service. During installation, you may be prompted for the installation of dependencies. Once the installation is done, the server is started at _http://localhost_. File structure will look like this: @@ -24,7 +24,7 @@ SVR.JS installer will also install these commands: ## Using SVR.JS installer for GNU/Linux (installer packages made before April 5, 2024) -SVR.JS now has a brand new installer for GNU/Linux. First, [download SVR.JS installer](https://downloads.svrjs.org/installer), then unpack your SVR.JS installer zip archive. After unpacking the installer, download SVR.JS zip archive (not installer), copy it to the installer directory and rename it to "_svrjs.zip_". Then run SVR.JS installer using `sudo bash installer.sh`. After starting the installer, you will be prompted to select the type of OS (type of GNU/Linux distribution). After selecting the type, SVR.JS installer will install Node.JS, SVR.JS and create SVR.JS service. During installation, you may be prompted for the installation of dependencies. Once the installation is done, restart your server OS or type `systemctl start svrjs` or `/etc/init.d/svrjs start` to start SVR.JS and get a web server on _http://localhost_. +SVR.JS now has a brand new installer for GNU/Linux. First, [download SVR.JS installer](https://downloads.svrjs.org/installer), then unpack your SVR.JS installer zip archive. After unpacking the installer, download SVR.JS zip archive (not installer), copy it to the installer directory and rename it to "_svrjs.zip_". Then run SVR.JS installer using `sudo bash installer.sh`. After starting the installer, you will be prompted to select the type of OS (type of GNU/Linux distribution). After selecting the type, SVR.JS installer will install Node.js, SVR.JS and create SVR.JS service. During installation, you may be prompted for the installation of dependencies. Once the installation is done, restart your server OS or type `systemctl start svrjs` or `/etc/init.d/svrjs start` to start SVR.JS and get a web server on _http://localhost_. File structure will look like this: @@ -40,7 +40,7 @@ SVR.JS installer will also install these commands: - _svrpasswd_ - SVR.JS user management tool ## Using SVR.JS installer for Windows Server -The command for SVR.JS installation is available in [the SVR.JS home page](https://svrjs.org). First off, press the _Windows Server_ button, then copy the command below the tab into the command prompt. The command looks something like this: `powershell -c "irm https://downloads.svrjs.org/installer/svr.js.installer.windows.20250105.ps1 | iex"`. After starting the installer, you will be prompted to select the type of SVR.JS installation. After selecting the type, SVR.JS installer will install Node.JS, SVR.JS and create SVR.JS service. During installation, you may be prompted for the installation of dependencies. Once the installation is done, the server is started at _http://localhost_. +The command for SVR.JS installation is available in [the SVR.JS home page](https://svrjs.org). First off, press the _Windows Server_ button, then copy the command below the tab into the command prompt. The command looks something like this: `powershell -c "irm https://downloads.svrjs.org/installer/svr.js.installer.windows.20250105.ps1 | iex"`. After starting the installer, you will be prompted to select the type of SVR.JS installation. After selecting the type, SVR.JS installer will install Node.js, SVR.JS and create SVR.JS service. During installation, you may be prompted for the installation of dependencies. Once the installation is done, the server is started at _http://localhost_. File structure will look like this: @@ -61,7 +61,7 @@ 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 --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. +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: @@ -88,7 +88,7 @@ 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 --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. +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: diff --git a/pages/docs/getting-started/updating-svrjs.md b/pages/docs/getting-started/updating-svrjs.md index fe16bbb..8a29dd3 100644 --- a/pages/docs/getting-started/updating-svrjs.md +++ b/pages/docs/getting-started/updating-svrjs.md @@ -18,8 +18,8 @@ SVR.JS can be updated using _create-svrjs-server_ tool by changing working direc - `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) -Then you can run `node svr.js` or `bun run svr.js` to extract new version of SVR.JS and new Node.JS modules. +Then you can run `node svr.js` or `bun run svr.js` to extract new version of SVR.JS and new Node.js modules. ## Manual updating -SVR.JS can be updated manually by extracting _svr.js_, _modules.compressed_ and _svr.compressed_ files from archive containing new version of SVR.JS to directory, to which older version of SVR.JS is installed (if you installed SVR.JS using SVR.JS installer, it is _/usr/lib/svrjs_ or _%SystemDrive%\svrjs\svrjs_). Then you can run `node svr.js` or `bun run svr.js` to extract new version of SVR.JS and new Node.JS modules. +SVR.JS can be updated manually by extracting _svr.js_, _modules.compressed_ and _svr.compressed_ files from archive containing new version of SVR.JS to directory, to which older version of SVR.JS is installed (if you installed SVR.JS using SVR.JS installer, it is _/usr/lib/svrjs_ or _%SystemDrive%\svrjs\svrjs_). Then you can run `node svr.js` or `bun run svr.js` to extract new version of SVR.JS and new Node.js modules. diff --git a/pages/docs/mod-notes.md b/pages/docs/mod-notes.md index a6a1aa1..622ccd7 100644 --- a/pages/docs/mod-notes.md +++ b/pages/docs/mod-notes.md @@ -16,7 +16,7 @@ easy-waf integration is a WAF (web application firewall) mod. **NOTICE: Using a WAF (Web Application Firewall) is no subsitute for web application security, because attacker will find a way to bypass the WAF.** -Configuration file is _easywaf-config.json_ inside SVR.JS installation directory. Configuration is passed to easy-waf. You can see documentation at [its GitHub page](https://github.com/timokoessler/easy-waf). This mod requires _easy-waf_ Node.JS module. +Configuration file is _easywaf-config.json_ inside SVR.JS installation directory. Configuration is passed to easy-waf. You can see documentation at [its GitHub page](https://github.com/timokoessler/easy-waf). This mod requires _easy-waf_ Node.js module. From easy-waf-integration 1.2.0, there is also additional mailConfig property, which is an object with those values: @@ -154,7 +154,7 @@ SvelteKit integration is a mod, that enables SVR.JS to serve SvelteKit applicati The webroot (_wwwroot_ _config.json_ property) serves as a SvelteKit application directory. It's recommended to set the owner of the SvelteKit application directory (around with all the files in it) as the user, on which SVR.JS is running (usually "svrjs"). -The SvelteKit application must have Node.JS adapter (@sveltejs/adapter-node npm package) configured, and a "build" directory in order for the integration to work. You can generate the files in the "build" directory by running `npm run build` on the SvelteKit application. +The SvelteKit application must have Node.js adapter (@sveltejs/adapter-node npm package) configured, and a "build" directory in order for the integration to work. You can generate the files in the "build" directory by running `npm run build` on the SvelteKit application. It's also recommended to forbid the access to ".env" file, ".svelte-kit" and ".git" directories, in case SvelteKit integration mod fails to load. You can set up _nonStandardCodes_ _config.json_ property like this: ```json diff --git a/pages/docs/requirements.md b/pages/docs/requirements.md index 93e9888..5387772 100644 --- a/pages/docs/requirements.md +++ b/pages/docs/requirements.md @@ -6,12 +6,12 @@ title: System requirements ## 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) / Latest version of Deno (experimental). -- OS supported by Node.JS/Bun/Deno. +- 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/Deno. ## Recommended -- Latest Node.JS LTS version. +- Latest Node.js LTS version. - 2-core CPU or better. - 1.5GB of RAM or more. - One of tested platforms: Android, FreeBSD, GNU/Linux, Haiku, Oracle Solaris, Microsoft Windows. diff --git a/pages/docs/server-side-javascript/migration.md b/pages/docs/server-side-javascript/migration.md index 8160c9f..3fbf416 100644 --- a/pages/docs/server-side-javascript/migration.md +++ b/pages/docs/server-side-javascript/migration.md @@ -4,16 +4,16 @@ title: Migration to SVR.JS # Migration to SVR.JS -If you have previously built your web application using the Node.JS http library, Express framework, or Koa framework, you can easily migrate that code to SVR.JS server-side JavaScript. +If you have previously built your web application using the Node.js http library, Express framework, or Koa framework, you can easily migrate that code to SVR.JS server-side JavaScript. -## From Node.JS http library +## From Node.js http library -For applications built with the Node.JS http library, you can simply copy the contents of the request event listener to the SVR.JS server-side JavaScript. However, make sure to consider the _disableEndElseCallbackExecute_ option to ensure proper execution flow. +For applications built with the Node.js http library, you can simply copy the contents of the request event listener to the SVR.JS server-side JavaScript. However, make sure to consider the _disableEndElseCallbackExecute_ option to ensure proper execution flow. ```js disableEndElseCallbackExecute = true; //Without "var", else it will not work!!! -// Node.JS http library request event listener code goes here. +// Node.js http library request event listener code goes here. if (req.url == "/" && req.method == "GET") { res.writeHead(200, "OK", { "Content-Type": "text/plain", @@ -68,7 +68,7 @@ app.use(function (ctx, next) { } }); -// Optionally, if you want the main SVR.JS callback (not recommended by Koa, as it passes Node.JS req and res objects). +// Optionally, if you want the main SVR.JS callback (not recommended by Koa, as it passes Node.js req and res objects). app.use(function (ctx) { ctx.respond = false; elseCallback(ctx.req, ctx.res); diff --git a/pages/docs/server-side-javascript/svrjs-ssjs.md b/pages/docs/server-side-javascript/svrjs-ssjs.md index 0da5b32..439fadf 100644 --- a/pages/docs/server-side-javascript/svrjs-ssjs.md +++ b/pages/docs/server-side-javascript/svrjs-ssjs.md @@ -4,7 +4,7 @@ title: Server-side JavaScript # Server-side JavaScript -Another way to expand SVR.JS functionality is through server-side JavaScript located in _serverSideScript.js_ file inside SVR.JS web root (or locaten in SVR.JS installation directory if you're running SVR.JS 3.9.0 or newer, and you have set _useWebRootServerSideScript_ property to _false_). Server-side JavaScript allows you to create various web applications using JavaScript, Node.JS and SVR.JS API. +Another way to expand SVR.JS functionality is through server-side JavaScript located in _serverSideScript.js_ file inside SVR.JS web root (or locaten in SVR.JS installation directory if you're running SVR.JS 3.9.0 or newer, and you have set _useWebRootServerSideScript_ property to _false_). Server-side JavaScript allows you to create various web applications using JavaScript, Node.js and SVR.JS API. ## Predefined objects