mirror of
https://github.com/moudey/Shell.git
synced 2026-11-16 09:04:25 +08:00
View documentation on your local machine
WARNING: This is not meant to be used on a production sever!!
It's sole intention is to be able to see the documentation documents in a context like on the live website in order to be able to see the full formatting. So it's mainly intended for documentation authors or editors.
Local web server
Get Cassini 4 (tiny, redistributable ASP.NET webserver)
With PowerShell (no administrative privileges required):
# Source URL
$url = "https://github.com/adriancs2/CassiniDev/releases/download/5f7df0d/CassiniDev4.zip"
# Destination file
$zip = ".\CassiniDev4.zip"
# Download the file
Invoke-WebRequest -Uri $url -OutFile $zip
# Unzip the file
Expand-Archive -Path $zip -DestinationPath '.\bin\CassiniDev4\'
# Delete archive
Remove-Item $zip
Start the web server
With PowerShell:
# Set the port you want to listen on. 80 is the default for http://
$port = 80
# Run the webserver
.\bin\CassiniDev4\CassiniDev4.exe /port:$port /path:. /vpath:/ /nodirlist /portMode:Specific
echo "To see the documentation, open the following url in your browser:"
echo "http://localhost:$port/docs"
With Command Prompt:
# Set the port you want to listen on. 80 is the default for http://
set port = 80
# Run the webserver
.\bin\CassiniDev4\CassiniDev4.exe /port:%port% /path:. /vpath:/ /nodirlist /portMode:Specific
echo To see the documentation, open the following url in your browser:
echo http://localhost:%port%/docs
Stop the web server
In your tray icons section, you will find an icon showing above url as tooltip. Right-clicking on the icon opens a context menu with the following options:
- Show
- Brows
- View Log
- Exit
Obviously, choose Exit to quit the web server. :-)