This repository has been archived on 2024-09-12. You can view files and clone it, but cannot push or open issues or pull requests.
svrjs-website/source/index.md

293 lines
15 KiB
Markdown
Raw Normal View History

2024-03-15 21:53:12 +01:00
---
title: Main page
date: 2024-01-21 19:41:01
layout: index-page
sitemap: false
2024-04-13 11:21:42 +02:00
svrjsversion: 3.14.12
2024-03-15 21:53:12 +01:00
---
<section class="hero">
<div class="hero-content-column">
<div class="hero-content">
<div class="hero-description">
<h1>SVR.JS is a web server running on Node.JS</h1>
2024-04-14 17:28:43 +02:00
<p>Host a webpage, run server-side JavaScript, use mods to expand server functionality, or use it as a forward or reverse proxy &mdash; all in SVR.JS! SVR.JS is a web server that runs on top of Node.JS, thus enabling server-side JavaScript on webpages. SVR.JS also has an integrated log viewer, log highlighter, and user management tool. SVR.JS can run not only on Node.JS but also in Bun (experimental support).</p>
2024-03-15 21:53:12 +01:00
</div>
<div class="maindownloads" id="command-tab-other">
2024-04-13 11:21:42 +02:00
<a href="https://downloads.svrjs.org/svr.js.3.14.12.zip" class="styled-button">Download SVR.JS 3.14.12</a>
2024-03-17 21:57:53 +01:00
<div class="download-separator">
2024-03-15 21:53:12 +01:00
<br />
</div>
<a class="styled-button styled-button-disabled">No supported LTS version</a>
</div>
<div class="otherdls">
<a href="https://downloads.svrjs.org/installer">
<b>Download SVR.JS installer for GNU/Linux</b>
</a>
<br />
<a href="/docs#Installation"><b>How do I install SVR.JS?</b></a> <a href="/docs#Updating-SVR-JS"><b>How can I update it?</b></a>
<br />
<a href="/mods"><b>Download official SVR.JS mods</b></a>
<br />
<a href="/otherdownloads">More download options</a>
<br />
<a href="/changelog">Change log</a>
<br />
</div>
</div>
</div>
</section>
<section class="index-section-even">
<h2>FEATURES</h2>
<div class="promo-point-container">
<div class="promo-point-subcontainer">
<div class="promo-point">
<img src="/img/free-as-in-freedom.png" alt="Free as in freedom" class="promo-image">
<div class="promo-text">
<h3>It's free as in freedom!</h3>
<p>You don't need to worry about <a href="https://www.gnu.org/proprietary/proprietary.html">proprietary malware</a>, "You may be a victim of software counterfeiting." windows (but you can <a href="/invoke500.svr?aprilfools">visit it</a>), crashes caused by non-genuine versions of server software, or <a href="https://www.gnu.org/proprietary/proprietary-back-doors.html">universal backdoors planted by Big Tech</a>. SVR.JS is licensed under the MIT (or X11) license, and it's open-source, so there are no secretly planted backdoors. SVR.JS is running on Node.JS, which is also free software (also MIT/X11 license). We have a <a href="https://git.svrjs.org">Git repository</a>, so you can <a href="/contribute">contribute to SVR.JS</a>! </p>
2024-03-15 21:53:12 +01:00
</div>
</div>
</div>
<div class="promo-point-subcontainer">
<div class="promo-point">
<img src="/img/scalable.png" alt="Scalable" class="promo-image">
<div class="promo-text">
<h3>It's scalable!</h3>
<p>SVR.JS is running on Node.JS, which is a JavaScript runtime using event-driven infrastructure, so SVR.JS is handling I/O-intensive operations pretty well. Additionally, SVR.JS is by default running in clusters, so it withstands more requests, server process hang-ups, and worker crashes.</p>
</div>
</div>
</div>
<div class="promo-point-clearfix-halfway"></div>
<div class="promo-point-subcontainer">
<div class="promo-point">
<img src="/img/secure.png" alt="Secure" class="promo-image">
<div class="promo-text">
<h3>It's secure!</h3>
<p>We are putting the cybersecurity of your websites first. SVR.JS has a built-in URL sanitizer to prevent path traversal, protects sensitive data from brute force attacks on HTTP authentication by default, and forbids website visitors' access to sensitive configuration files. You can also configure SVR.JS to hide server-side JavaScript files and hide the server version. This way, bad actors will have a pretty hard time hacking your site (unless you're using vulnerable mods or vulnerable server-side JavaScript)! SVR.JS also has a built-in block list, so you can simply block those bad actors that might take control over your server. You can check <a href="/vulnerabilities">which versions of SVR.JS are vulnerable</a>. </p>
2024-03-15 21:53:12 +01:00
</div>
</div>
</div>
<div class="promo-point-subcontainer">
<div class="promo-point">
<img src="/img/configurable.png" alt="Configurable" class="promo-image">
<div class="promo-text">
<h3>It's configurable!</h3>
<p>You can configure SVR.JS through <i>config.json</i> file. You can also install mods and use server-side JavaScript! Focus on developing JavaScript web applications with SVR.JS! </p>
</div>
</div>
</div>
<div class="promo-point-clearfix"></div>
</div>
</section>
<section class="index-section-odd">
<h2>SVR.JS IN ACTION</h2>
<div class="section-videos">
<video poster="/vid/svrjs-in-action.png" controls preload="metadata">
<source src="/vid/svrjs-in-action.mp4" type="video/mp4">
<source src="/vid/svrjs-in-action.ogv" type="video/ogg">
<b>Your browser is obsolete and doesn't support HTML5 video.</b>
<a href="/vid/svrjs-in-action.mp4">Watch the video</a>
</video>
<p>
<i>This video shows the process of developing a basic web application showing user's IP address using Node.JS and the SVR.JS API. HTML, CSS, and server-side JavaScript files are all in the public domain.</i>
</p>
</div>
</section>
<section class="index-section-even">
<h2>COMPARISON WITH COMPETITORS</h2>
<div class="section-container">
<div class="comparison-table-container">
<table class="comparison-table">
<tbody>
<tr>
<th class="comparison-table-blank"></th>
<th class="comparison-table-myproduct">SVR.JS</th>
<th>lws</th>
<th>http-server</th>
<th>serve</th>
<th>Apache httpd<sup>*</sup></th>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> HTTP authentication </td>
</tr>
<tr>
<td class="comparison-table-feature">HTTP authentication</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes (basic)</div>
</td>
<td class="comparison-table-yes">Yes (basic)</td>
<td class="comparison-table-yes">Yes (basic)</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes (basic, digest)</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> HTTP authentication brute force prevention </td>
</tr>
<tr>
<td class="comparison-table-feature">HTTP authentication brute force prevention</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes, enabled by default</div>
</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes, via mod_security</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> HTTPS </td>
</tr>
<tr>
<td class="comparison-table-feature">HTTPS</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes</div>
</td>
<td class="comparison-table-yes">Yes</td>
<td class="comparison-table-yes">Yes</td>
<td class="comparison-table-yes">Yes</td>
<td class="comparison-table-yes">Yes</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> OCSP stapling </td>
</tr>
<tr>
<td class="comparison-table-feature">OCSP stapling</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes</div>
</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> CGI (Common Gateway Interface) </td>
</tr>
<tr>
<td class="comparison-table-feature">CGI (Common Gateway Interface)</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes, via RedBrick</div>
</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes, via mod_cgi</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> SSI (Server-Side Includes) </td>
</tr>
<tr>
<td class="comparison-table-feature">SSI (Server-Side Includes)</td>
<td class="comparison-table-sus comparison-table-myproduct">
<div>Obsolete, via Berno</div>
</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes, via mod_ssi</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> Server-side JavaScript </td>
</tr>
<tr>
<td class="comparison-table-feature">Server-side JavaScript</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes, via Node.JS and SVR.JS API</div>
</td>
<td class="comparison-table-yes">Yes, via Node.JS and Koa framework</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-sus">Experimental, via mod_js</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> HTTP compression </td>
</tr>
<tr>
<td class="comparison-table-feature">HTTP compression</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes (br, gzip, deflate)</div>
</td>
<td class="comparison-table-yes">Yes (br, gzip)</td>
<td class="comparison-table-yes">Yes (br, gzip)</td>
<td class="comparison-table-yes">Yes (gzip, deflate)</td>
<td class="comparison-table-yes">Yes (br, gzip)</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> URL rewriting </td>
</tr>
<tr>
<td class="comparison-table-feature">URL rewriting</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes, built-in</div>
</td>
<td class="comparison-table-yes">Yes, via lws-rewrite</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes, via mod_rewrite</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> HTTP/2 </td>
</tr>
<tr>
<td class="comparison-table-feature">HTTP/2</td>
<td class="comparison-table-yes comparison-table-myproduct">
<div>Yes</div>
</td>
<td class="comparison-table-yes">Yes</td>
<td class="comparison-table-yes">Yes</td>
<td class="comparison-table-no">No</td>
<td class="comparison-table-yes">Yes</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> License </td>
</tr>
<tr>
<td class="comparison-table-feature">License</td>
<td class="comparison-table-myproduct">
<div>MIT</div>
</td>
<td>MIT</td>
<td>MIT</td>
<td>MIT</td>
<td>Apache 2.0</td>
</tr>
<tr class="comparison-table-mobile-feature">
<td colspan="5"> Architecture </td>
</tr>
<tr>
<td class="comparison-table-feature">Architecture</td>
<td class="comparison-table-myproduct">
<div>Event-driven + Clustered</div>
</td>
<td>Event-driven</td>
<td>Event-driven</td>
<td>Event-driven</td>
<td>Thread-based</td>
</tr>
</tbody>
</table>
<small>
<sup>*</sup>Apache httpd was included as a non-Node.JS-based reference <br /> Comparison done on August 2023. Node.JS-based servers are compared based on source code analysis from corresponding GitHub repositories (with exception of SVR.JS, which has self-hosted git repository). </small>
</div>
<p>
2024-03-19 20:05:19 +01:00
<b>As you can see, SVR.JS is more similar in terms of functionality to traditional HTTP servers, like Apache httpd, and it's more advanced than some other Node.JS-based web servers.</b> You can deploy your JavaScript web applications and use many features offered by traditional web servers without using any reverse proxy (using a reverse proxy, like NGINX or Apache httpd is common when deploying Node.JS-based web apps).
2024-03-15 21:53:12 +01:00
</p>
</div>
</section>
<section class="index-section-odd">
<h2>FAQ</h2>
<div class="section-container">
<h3>What is a web server?</h3>
<p>A web server is computer software that accepts HTTP requests and serves websites. Web servers can also be underlying hardware running web server software.</p>
<h3>What is SVR.JS?</h3>
<p>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.</p>
<h3>How was SVR.JS created?</h3>
<p>Someone in 2018 wanted to create a website, but he didn't know about setting up typical 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 <i>svr.js</i>. Since then, this web server has been gradually turned from a web server intended for one website into a general-purpose web server. And this is now what SVR.JS is today! You can read more about the recent history of SVR.JS by deciphering <i><a href="/zsoiebook.svr">The Book of ZSOiE</a></i>!</p>
2024-03-15 21:53:12 +01:00
<h3>How did SVR.JS get its name?</h3>
<p>SVR.JS got its name from the original name of the server script: <i>svr.js</i>, one of many generic file names for a server written in JavaScript. </p>
<h3>What is Node.JS?</h3>
<p>Node.JS is an asynchronous event-driven JavaScript runtime built on Chromium's V8 engine. Node.JS is designed to build scalable network applications.</p>
<h3>How can I use SVR.JS?</h3>
<p>You can <a href="/docs">read its documentation</a> to learn how to use the SVR.JS web server. </p>
</div>
</section>