feat: add a mention about SVR.JS installer for Windows Server
Some checks failed
Deploy Next.js application / deploy (push) Failing after 10m13s

This commit is contained in:
Dorian Niemiec 2024-12-04 21:21:19 +01:00
parent 115e630bf7
commit b2a792d341
3 changed files with 41 additions and 8 deletions

View file

@ -21,13 +21,15 @@ const Hero = () => {
const [command, setCommand] = useState( const [command, setCommand] = useState(
'sudo bash -c "$(curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh)"' 'sudo bash -c "$(curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh)"'
); );
const [selectedButton, setSelectedButton] = useState<"linux" | "docker">( const [selectedButton, setSelectedButton] = useState<
"linux" "linux" | "windows" | "docker"
); >("linux");
const commands = { const commands = {
linux: linux:
'sudo bash -c "$(curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh)"', 'sudo bash -c "$(curl -fsSL https://downloads.svrjs.org/installer/svr.js.installer.linux.20240509.sh)"',
windows:
'powershell -c "irm https://downloads.svrjs.org/installer/svr.js.installer.windows.20241204.ps1 | iex"',
docker: docker:
"docker pull svrjs/svrjs && docker run --name mysvrjs -d -p 80:80 --restart=always svrjs/svrjs" "docker pull svrjs/svrjs && docker run --name mysvrjs -d -p 80:80 --restart=always svrjs/svrjs"
}; };
@ -38,7 +40,7 @@ const Hero = () => {
setTimeout(() => setIsCopied(false), 2000); setTimeout(() => setIsCopied(false), 2000);
}; };
const handleButtonClick = (type: "linux" | "docker") => { const handleButtonClick = (type: "linux" | "windows" | "docker") => {
setCommand(commands[type]); setCommand(commands[type]);
setSelectedButton(type); setSelectedButton(type);
}; };
@ -138,6 +140,29 @@ const Hero = () => {
/> />
</svg> </svg>
</Button> </Button>
<Button
className={`rounded-full w-12 h-12 lg:w-16 lg:h-16 ${
selectedButton === "windows"
? "bg-accent"
: "bg-primary-foreground/20"
}`}
variant={"ghost"}
onClick={() => handleButtonClick("windows")}
>
<span className="sr-only">Windows Server</span>
<svg
xmlns="http://www.w3.org/2000/svg"
width={64}
height={64}
viewBox="0 0 4875 4875"
fill="none"
>
<path
fill="currentColor"
d="M0 0h2311v2310H0zm2564 0h2311v2310H2564zM0 2564h2311v2311H0zm2564 0h2311v2311H2564"
/>
</svg>
</Button>
<Button <Button
className={`rounded-full w-12 h-12 lg:w-16 lg:h-16 ${ className={`rounded-full w-12 h-12 lg:w-16 lg:h-16 ${
selectedButton === "docker" selectedButton === "docker"

View file

@ -4,9 +4,9 @@ title: Installation
# Installation # Installation
## Using SVR.JS installer (installer packages made in April 5, 2024 and later; GNU/Linux only) ## 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, switch to _GNU/Linux_ tab, 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.20240509.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.20240509.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:
@ -22,7 +22,7 @@ SVR.JS installer will also install these commands:
- _svrpasswd_ - SVR.JS user management tool - _svrpasswd_ - SVR.JS user management tool
- _svrjs-updater_ - SVR.JS updater - _svrjs-updater_ - SVR.JS updater
## Using SVR.JS installer (installer packages made before April 5, 2024; GNU/Linux only) ## 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_.
@ -39,6 +39,14 @@ SVR.JS installer will also install these commands:
- _svrjs-logviewer_ - SVR.JS log viewer - _svrjs-logviewer_ - SVR.JS log viewer
- _svrpasswd_ - SVR.JS user management tool - _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.20241204.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:
- _%SystemDrive%\svrjs\svrjs_ - SVR.JS installation directory
- _%SystemDrive%\svrjs\wwwroot_ - SVR.JS web root
## Using _create-svrjs-server_ tool ## Using _create-svrjs-server_ tool
To install SVR.JS using _create-svrjs-server_, first install the utility using `npm install -g svrjs`. Then create a directory, which will contain SVR.JS. Change your working directory to a new one, and run one of those commands: To install SVR.JS using _create-svrjs-server_, first install the utility using `npm install -g svrjs`. Then create a directory, which will contain SVR.JS. Change your working directory to a new one, and run one of those commands:

View file

@ -22,4 +22,4 @@ Then you can run `node svr.js` or `bun run svr.js` to extract new version of SVR
## 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_). 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.