style: change the spelling of a JavaScript runtime from "Node.JS" to "Node.js"
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m8s

This commit is contained in:
Dorian Niemiec 2025-01-07 16:27:52 +01:00
parent dae00d1762
commit 8109a52fe6
17 changed files with 55 additions and 55 deletions

View file

@ -9,14 +9,14 @@ import { Metadata } from "next";
// baseURL [ENV] // baseURL [ENV]
export const metadata: Metadata = { 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: 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}` }, alternates: { canonical: `${process.env.NEXT_PUBLIC_WEBSITE_URL}` },
openGraph: { openGraph: {
title: "SVR.JS - a web server running on Node.JS", title: "SVR.JS - a web server running on Node.js",
description: 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}`, url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}`,
type: "website", type: "website",
images: [ images: [
@ -24,16 +24,16 @@ export const metadata: Metadata = {
url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`, url: `${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`,
width: 800, width: 800,
height: 600, height: 600,
alt: "SVR.JS - a web server running on Node.JS" alt: "SVR.JS - a web server running on Node.js"
} }
] ]
}, },
twitter: { twitter: {
card: "summary_large_image", card: "summary_large_image",
site: "@SVR_JS", site: "@SVR_JS",
title: "SVR.JS - a web server running on Node.JS", title: "SVR.JS - a web server running on Node.js",
description: 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`], images: [`${process.env.NEXT_PUBLIC_WEBSITE_URL}/metadata/svrjs-cover.png`],
creator: "@SVR_JS" creator: "@SVR_JS"
} }

View file

@ -11,7 +11,7 @@ const poppins = Poppins({
}); });
export const metadata: Metadata = { 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({ export default function RootLayout({

View file

@ -24,7 +24,7 @@ const About = () => {
</span> </span>
</h2> </h2>
<p className="text-lg text-muted-foreground mt-4"> <p className="text-lg text-muted-foreground mt-4">
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 server-side JavaScript on webpages. SVR.JS also has an
integrated log viewer, log highlighter, and user management integrated log viewer, log highlighter, and user management
tool. You can host a webpage using SVR.JS, run server-side tool. You can host a webpage using SVR.JS, run server-side

View file

@ -79,7 +79,7 @@ const Hero = () => {
</div> </div>
<p className="text-lg text-muted-foreground md:w-10/12 mx-auto lg:mx-0"> <p className="text-lg text-muted-foreground md:w-10/12 mx-auto lg:mx-0">
Host reliably and securely, and scale effortlessly with SVR.JS, an Host reliably and securely, and scale effortlessly with SVR.JS, an
open-source and configurable web server running on Node.JS that&apos;s open-source and configurable web server running on Node.js that&apos;s
designed to handle high loads. designed to handle high loads.
</p> </p>
<div className="relative mx-auto lg:mx-0 flex gap-2 flex-col-reverse lg:flex-row justify-start items-center w-fit"> <div className="relative mx-auto lg:mx-0 flex gap-2 flex-col-reverse lg:flex-row justify-start items-center w-fit">

View file

@ -76,13 +76,13 @@ export const Features = [
icon: <Bird className="w-10 h-10 text-primary" />, icon: <Bird className="w-10 h-10 text-primary" />,
title: "Free as in freedom", title: "Free as in freedom",
description: 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: <BarChart4 className="w-10 h-10 text-primary" />, icon: <BarChart4 className="w-10 h-10 text-primary" />,
title: "Scalable", title: "Scalable",
description: 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: <ShieldCheck className="w-10 h-10 text-primary" />, icon: <ShieldCheck className="w-10 h-10 text-primary" />,
@ -110,13 +110,13 @@ export const questions = [
key: "item-2", key: "item-2",
question: "What is SVR.JS?", question: "What is SVR.JS?",
answer: 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", key: "item-3",
question: "How was SVR.JS created?", question: "How was SVR.JS created?",
answer: 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", key: "item-4",
@ -126,9 +126,9 @@ export const questions = [
}, },
{ {
key: "item-5", key: "item-5",
question: "What is Node.JS?", question: "What is Node.js?",
answer: 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", key: "item-6",

View file

@ -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 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 ## Error handling
@ -110,7 +110,7 @@ SVR.JS applies mods for request URLs beginning with "_http://_" or with "_https:
### _req_ ### _req_
_req_ object is almost same, as _req_ object in Node.JS _req_ object is almost same, as _req_ object in Node.js
Differences: Differences:
@ -120,7 +120,7 @@ Differences:
### _res_ ### _res_
_res_ object is almost same, as _res_ object in Node.JS _res_ object is almost same, as _res_ object in Node.js
Differences: Differences:
@ -382,19 +382,19 @@ if (!res.writeHead) {
<small>_Added in SVR.JS 3.4.21, 3.7.0_</small> <small>_Added in SVR.JS 3.4.21, 3.7.0_</small>
_req_ object is the same, as _req_ object in Node.JS _req_ object is the same, as _req_ object in Node.js
### _socket_ ### _socket_
<small>_Added in SVR.JS 3.4.21, 3.7.0_</small> <small>_Added in SVR.JS 3.4.21, 3.7.0_</small>
_socket_ object is the same, as _socket_ object in Node.JS _socket_ object is the same, as _socket_ object in Node.js
### _head_ ### _head_
<small>_Added in SVR.JS 3.4.21, 3.7.0_</small> <small>_Added in SVR.JS 3.4.21, 3.7.0_</small>
_head_ object is the same, as _head_ object in Node.JS _head_ object is the same, as _head_ object in Node.js
### _configJSON_ ### _configJSON_

View file

@ -4,7 +4,7 @@ title: SVR.JS API (.js mods)
# 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 ## Error handling
@ -115,7 +115,7 @@ SVR.JS applies mods for request URLs beginning with "_http://_" or with "_https:
<small>_Added in SVR.JS 4.0.0_</small> <small>_Added in SVR.JS 4.0.0_</small>
_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_ ### _req.socket.realRemoteAddress_
@ -190,7 +190,7 @@ Rewrites the request URL to the _rewrittenURL_ parameter. Also invokes the URL s
<small>_Added in SVR.JS 4.0.0_</small> <small>_Added in SVR.JS 4.0.0_</small>
_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_ ### _res.socket.realRemoteAddress_
@ -232,7 +232,7 @@ Parameters:
Returns: _res_ property (in SVR.JS 4.5.0 and later). 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)_ ### _res.setHeader(name, value)_
@ -243,7 +243,7 @@ Parameters:
- _name_ - the response header name (_String_) - _name_ - the response header name (_String_)
- _value_ - the response header value (optional; _String_ or _Array_) - _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. 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
<small>_Added in SVR.JS 4.0.0_</small> <small>_Added in SVR.JS 4.0.0_</small>
_req_ object is the same, as _req_ object in Node.JS _req_ object is the same, as _req_ object in Node.js
### _socket_ ### _socket_
<small>_Added in SVR.JS 4.0.0_</small> <small>_Added in SVR.JS 4.0.0_</small>
_socket_ object is the same, as _socket_ object in Node.JS _socket_ object is the same, as _socket_ object in Node.js
### _head_ ### _head_
<small>_Added in SVR.JS 4.0.0_</small> <small>_Added in SVR.JS 4.0.0_</small>
_head_ object is the same, as _head_ object in Node.JS _head_ object is the same, as _head_ object in Node.js
### _logFacilities_ ### _logFacilities_

View file

@ -4,4 +4,4 @@ title: Client-initiated secure renegotiation
# 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.

View file

@ -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) - _rejectUnauthorizedClientCertificates_ (Boolean, SVR.JS 3.14.0 or newer)
- Option to disable verification of client certificates. - Option to disable verification of client certificates.
- _cipherSuite_ (String, SVR.JS 3.14.0 or newer) - _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) - _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. - 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) - _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) - _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). - 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) - _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 2<sup>32</sup>-1. Default is 4096 (Number, SVR.JS 3.14.0 or newer). - _headerTableSize_: Maximum number of bytes used for header compression. Minimum value is 0. Maximum value is 2<sup>32</sup>-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). - _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 2<sup>32</sup>-1. Default is 65535 (Number, 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 2<sup>32</sup>-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 2<sup>32</sup>-1. Default is 65535 (Number, SVR.JS 3.14.0 or newer). - _maxHeaderListSize_: Maximum size (uncompressed octets) of acceptable header list. Minimum value is 0. Maximum value is 2<sup>32</sup>-1. Default is 65535 (Number, SVR.JS 3.14.0 or newer).
- _maxHeaderSize_: Alias for _maxHeaderListSize_ (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). - _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 2<sup>16</sup>-1. Values should be in range from 0 to 2<sup>32</sup>-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 2<sup>16</sup>-1. Values should be in range from 0 to 2<sup>32</sup>-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) - _enableIncludingHeadAndFootInHTML_ (Boolean, SVR.JS 4.3.0 or newer)
- Option to enable including custom head and foot in files with _.html_ extension. - 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) - _blacklist_ (Array of Strings)
- Block list of IP addresses and CIDR ranges. - Block list of IP addresses and CIDR ranges.
- _disableServerSideScriptExpose_ (Boolean, SVR.JS 3.0.0 or newer) - _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) - _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.** - 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) - _exposeServerVersion_ (Boolean)

View file

@ -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. - _{errorDesc}_ - Displays a longer description of the server error.
- _{stack}_ - Displays the error stack, which is equivalent to the _Error.stack_ property in JavaScript. - _{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. - _{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_. - _{contact}_ - Displays the contact information of the server administrator, which can be set using the _serverAdministratorEmail_ property in _config.json_.

View file

@ -27,7 +27,7 @@ title: Features
- Expandability via server-side JavaScript and mods - Expandability via server-side JavaScript and mods
- Ability to serve non-standard error pages - Ability to serve non-standard error pages
- URL rewriting engine - 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 ## Compression and content delivery

View file

@ -6,7 +6,7 @@ title: Installation
## Using SVR.JS installer for GNU/Linux (installer packages made in April 5, 2024 and later) ## 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: 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) ## 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: File structure will look like this:
@ -40,7 +40,7 @@ SVR.JS installer will also install these commands:
- _svrpasswd_ - SVR.JS user management tool - _svrpasswd_ - SVR.JS user management tool
## Using SVR.JS installer for Windows Server ## 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: 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. 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: 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. 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: You will then see the message similar to this:

View file

@ -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 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)
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 ## 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.

View file

@ -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.** **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: 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 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: 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 ```json

View file

@ -6,12 +6,12 @@ title: System requirements
## 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) / Latest version of Deno (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/Deno. - OS supported by Node.js/Bun/Deno.
## Recommended ## Recommended
- Latest Node.JS LTS version. - Latest Node.js LTS version.
- 2-core CPU or better. - 2-core CPU or better.
- 1.5GB of RAM or more. - 1.5GB of RAM or more.
- One of tested platforms: Android, FreeBSD, GNU/Linux, Haiku, Oracle Solaris, Microsoft Windows. - One of tested platforms: Android, FreeBSD, GNU/Linux, Haiku, Oracle Solaris, Microsoft Windows.

View file

@ -4,16 +4,16 @@ title: Migration to SVR.JS
# 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 ```js
disableEndElseCallbackExecute = true; //Without "var", else it will not work!!! 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") { if (req.url == "/" && req.method == "GET") {
res.writeHead(200, "OK", { res.writeHead(200, "OK", {
"Content-Type": "text/plain", "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) { app.use(function (ctx) {
ctx.respond = false; ctx.respond = false;
elseCallback(ctx.req, ctx.res); elseCallback(ctx.req, ctx.res);

View file

@ -4,7 +4,7 @@ title: Server-side JavaScript
# 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 ## Predefined objects