TinyWeb Server on Windows
On March 21,2022 by Tom RoutleyThe server requirements of a webmaster working on a website may vary from time to time. If they are constrained by a small size, minimal memory, speed and low costs, then tinyweb offers a nice solution. Not only is a extremely small server, it also works without installation. It can be easily run on Windows OS by accessing it via command. One of the best features about this server is that the webmaster can launch multiple tiny web browsers at any given point in time. All these features make this a very handy tool on Windows for those who feel restricted while working with their usual servers.
Introduction to TinyWeb
TinyWeb is a lightweight server for Windows, which works quickly and is very precise.
Features:
It doesn't require installation .
. Ultra-compact (only 59kb in size).
(only 59kb in size). Consumes less than 3 MB of memory.
of memory. Very fast .
. Free .
Download Tinyweb
To run TinyWeb
You will have to create an index.html file: Example: c:wwwindex.html
Then add some content, e.g.:
Hello, world !In the command line, run : tiny c:www Note: You need to use the absolute path Check the result on : http://localhost
:
How to Stop TinyWeb
Open the Task Manager ( CTRL+Alt+Del ) and end the process tine
( ) and end the process Or, using the command line: taskkill /F /IM tine
CGI
You can use TinyWeb for CGI:
Create a file: c:wwwcgi-bintest.bat
Add the following code:
@echo off
echo Content-type: text/plain
echo.
echo.
echo Hi !
echo Your IP ADDRESS is %REMOTE_ADDR% and your BROWSER is %HTTP_USER_AGENT%
Go to:http://localhost/cgi-bin/test.bat
You can launch several Tiny web servers simultaneously.
Note: there is also an SSL version, which is also free - TinySSL. Download it here.
Binay Files in CGI
Unlike Unix / Linux, the Windows console does not use binary data by default. If your CGI needs to send binary files you will need to force it into binary mode manually. For example in Python:
import sys if sys.platform == "win32": import os, msvcrt msvcrt.setmode(sys.stdouileno(), os.O_BINARY)
Image: © Unsplash
Article Recommendations
Latest articles
Popular Articles
Archives
- November 2024
- October 2024
- September 2024
- August 2024
- July 2024
- June 2024
- May 2024
- April 2024
- March 2024
- February 2024
- January 2024
- December 2023
- November 2023
- October 2023
- September 2023
- August 2023
- July 2023
- June 2023
- May 2023
- April 2023
- March 2023
- February 2023
- January 2023
- December 2022
- November 2022
- October 2022
- September 2022
- August 2022
- July 2022
- June 2022
- May 2022
- April 2022
- March 2022
- February 2022
- January 2022
- December 2021
- November 2021
- October 2021
- September 2021
- August 2021
- July 2021
- January 2021
Leave a Reply