You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once you start the server, an instance of Chrome will open up. Due to limitations of the Selenium package, you will have to manually type in the address of the server. But after that you shouldn't encounter any issues!
5
+
6
+
## Description
7
+
An easy-to-use Local HTTP Server written in Python using the Socket and Selenium packages!
8
+
9
+
## Features
10
+
* Easy to use and fast to set up
11
+
* It detects file changes and conveniently refreshes your Chrome tab for you (Support for other browsers coming soon!)
12
+
* Supports GET requests and POST requests are coming soon as well
13
+
14
+
## Installation & Requirements
15
+
#### Requirements:
16
+
* Python 3.x, you can install by visiting http://www.python.org
* Chrome webdriver (Selenium is based on the chromedriver for refreshing your tab.), visit https://chromedriver.chromium.org/home
21
+
22
+
23
+
#### Chrome Webdriver installation
24
+
1. Visit https://chromedriver.chromium.org/home and download the latest stable release of the driver
25
+
2. Once you downloaded it, go to your C:/ drive and create a folder called `webdrivers` and copy the chrome webdriver to that folder.
26
+
3. Open the Windows menu by pressing the Windows key and type 'Environment Variables', a settings result should appear. Open it, then go to Environment Variables, then scroll down to where it says 'Path', select it then click 'Edit', create a new entry and enter the path to the folder you created earlier. If you followed the steps it should be `C:\webdrivers`.
27
+
4. You're done! You can now run the server with no problem.
28
+
29
+
## Usage
30
+
Open a command prompt in the directory in which you have the files and type `python server.py`. You're done! You can now start editing your files for your website inside of the `web` directory and the server will display them at `http://127.0.0.1:8000`!
print(f"Starting server on {self.host}:{self.port}")
120
+
121
+
self.sv.bind((self.host, self.port))
122
+
123
+
print(f"Successfully started server on {self.host}:{self.port}")
124
+
125
+
print("\nDISCLAIMER: Due to limitations of the Selenium package and the way the code is set up, you will have to manually type in the server address. We're looking into solving the problem!\n")
<h3id="text">If you're seeing this, it means that the server started up successfully and you're ready to use it in your web design endeavours! You don't have to restart the server if you want to change a file. All you have to do is save your desired file and it will automatically refresh your browser for you! If you like using my server, consider starring the Github repository <ahref="https://github.com/dsnk24/sai-http-server">here!</a></h3>
0 commit comments