16 KiB
title | date | layout | sitemap | svrjsversion |
---|---|---|---|---|
Main page | 2024-01-21 19:41:01 | index-page | false | 3.15.3 |
SVR.JS is a web server running on Node.JS
Host a webpage, run server-side JavaScript, use mods to expand server functionality, or use it as a forward or reverse proxy — 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).
FEATURES
It's free as in freedom!
You don't need to worry about proprietary malware, "You may be a victim of software counterfeiting." windows (but you can visit it), crashes caused by non-genuine versions of server software, or universal backdoors planted by Big Tech. 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 Git repository, so you can contribute to SVR.JS!
It's scalable!
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.
It's secure!
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 which versions of SVR.JS are vulnerable.
It's configurable!
You can configure SVR.JS through config.json file. You can also install mods and use server-side JavaScript! Focus on developing JavaScript web applications with SVR.JS!
SVR.JS IN ACTION
This video shows the process of setting up a WordPress website running on SVR.JS. The video showcases setting up SVR.JS, PHP, MariaDB and WordPress, editing a website and securing the web server.
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.
COMPARISON WITH COMPETITORS
SVR.JS | lws | http-server | serve | Apache httpd* | |
---|---|---|---|---|---|
HTTP authentication | |||||
HTTP authentication |
Yes (basic)
|
Yes (basic) | Yes (basic) | No | Yes (basic, digest) |
HTTP authentication brute force prevention | |||||
HTTP authentication brute force prevention |
Yes, enabled by default
|
No | No | No | Yes, via mod_security |
HTTPS | |||||
HTTPS |
Yes
|
Yes | Yes | Yes | Yes |
OCSP stapling | |||||
OCSP stapling |
Yes
|
No | No | No | Yes |
CGI (Common Gateway Interface) | |||||
CGI (Common Gateway Interface) |
Yes, via RedBrick
|
No | No | No | Yes, via mod_cgi |
SSI (Server-Side Includes) | |||||
SSI (Server-Side Includes) |
Obsolete, via Berno
|
No | No | No | Yes, via mod_ssi |
Server-side JavaScript | |||||
Server-side JavaScript |
Yes, via Node.JS and SVR.JS API
|
Yes, via Node.JS and Koa framework | No | No | Experimental, via mod_js |
HTTP compression | |||||
HTTP compression |
Yes (br, gzip, deflate)
|
Yes (br, gzip) | Yes (br, gzip) | Yes (gzip, deflate) | Yes (br, gzip) |
URL rewriting | |||||
URL rewriting |
Yes, built-in
|
Yes, via lws-rewrite | No | No | Yes, via mod_rewrite |
HTTP/2 | |||||
HTTP/2 |
Yes
|
Yes | Yes | No | Yes |
License | |||||
License |
MIT/X11
|
MIT/X11 | MIT/X11 | MIT/X11 | Apache 2.0 |
Architecture | |||||
Architecture |
Event-driven + Clustered
|
Event-driven | Event-driven | Event-driven | Thread-based |
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).
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. 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).
FAQ
What is a web server?
A web server is computer software that accepts HTTP requests and serves websites. Web servers can also be underlying hardware running web server software.
What is SVR.JS?
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.
How was SVR.JS created?
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!
How did SVR.JS get its name?
SVR.JS got its name from the original name of the server script: svr.js, one of many generic file names for a server written in JavaScript.
What is Node.JS?
Node.JS is an asynchronous event-driven JavaScript runtime built on Chromium's V8 engine. Node.JS is designed to build scalable network applications.
How can I use SVR.JS?
You can read its documentation to learn how to use the SVR.JS web server.