¿Cómo tener un servidor web simple en 2 líneas? ¿y en una?

Viendo una página encontré esto(script en python):

import SimpleHTTPServer
SimpleHTTPServer.test()

Te comparte el directorio actual de trabajo por el puerto 8000, por lo que si entramos con un navegador web veremos el índice con todos los archivos del directorio.

Ahora en una línea:

python -m SimpleHTTPServer

Fuente:

http://www.shell-fu.org/lister.php?id=54

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.