This script provides a simple way to start a local HTTP server in any directory.
Quick Server allows you to quickly serve files from your current working directory over HTTP, making it easy to develop and test web applications locally.
-
Clone this repository or download the script:
git clone https://github.com/username/quick-server.git
-
Make the script executable:
chmod +x /path/to/quick-server.sh
-
Optionally, add it to your PATH for global access.
quick-server.sh [port] [directory]Where [port] is an optional parameter to specify the port number (default is 8000) and [directory] is an optional parameter to specify the directory to serve (default is the current directory).
Start a server on the default port (8000):
quick-server ~/Developer/my-website Start a server on port 3000:
quickServer 3000 ~/Developer/my-websitequick-server 3000 ~/Developer/my-website- Simple to use with minimal configuration
- Optional port selection
- Access files from your browser at
http://localhost:[port] - Nice color output for easy readability
- Python (for Python's built-in HTTP server) or Node.js (for http-server)
GNU GENERAL PUBLIC LICENSE Version 3
This script is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this script. If not, see https://www.gnu.org/licenses/.