[PYTHON] A collection of one-liner web servers

I tried collecting one-liner Web servers

I always read this article because I forget how to write it 100% every time I start the one-liner web server, but since it starts from searching for the article every time, I summarized it in a shell script.

https://github.com/5t111111/http-server-one-liner

How to use

A wrapper script that launches one of the following web servers:

The default is Python 2.x or 3.x. It depends on the environment.

Usage

$httpserver program port number

Example

#Default(Python 2.x or 3.x)The port number is also the default one
$ httpserver

#Default(Python 2.x or 3.x)With port number specified
$ httpserver 8080

# Python 2.x or 3.x
$ httpserver python 8080

# Python 3.x
$ httpserver python3 8080

# Ruby
$ httpserver ruby 8080

# PHP
$ httpserver php 8080

Installation

Clone the repository to a suitable location or download the script file and put it in the path.

Installation example

$ cd ~
$ git clone [email protected]:5t111111/http-server-one-liner.git
$ export PATH=$HOME/http-server-one-liner:$PATH
$ rehash #option

Recommended Posts

A collection of one-liner web servers
I tried collecting one-liner web servers
A collection of code often used in personal Python
A collection of commands frequently used in server management
Super simple: A collection of shells that output dates
A collection of Excel operations often used in Python
[python] [Gracenote Web API] A little customization of pygn
A collection of competitive pro techniques to solve with Python
Build a speed of light web API server with Falcon
[Introduction to AWS] A memorandum of building a web server on AWS
[Django] A collection of scripts that are convenient for development
A collection of methods used when aggregating data with pandas
A simple sample of pivot_table.
A memorandum of kernel compilation
A small memorandum of openpyxl
Comparison of 4 Python web frameworks
Image collection by web scraping
One-liner basic graph of HoloViews
A brief summary of Linux
One-liner web scraping by tse
A memorandum of using eigen3
[Linux Nginx] Command collection used for initial setting of Web server
[python, ruby] fetch the contents of a web page with selenium-webdriver
I know, but I can't stop--Python is a collection of common mistakes
Collect only facial images of a specific person by web scraping
[Kaggle] I made a collection of questions using the Titanic tutorial