Website in 3 second !!! 3 steps


Website in 3 second !!!  3 steps J

What will you do when you need a website to serve some static webpages, files(mp3, mp4..), ppt, xls anything. ?

I would say go for django J
Still that takes 2 to 3 minutes of time

Python is so beautiful, use SimpleHTTPServer

Show you a demo of how to create simple website in 3 sec

1) Go to directory where files which are needed to be served
   Cd /home/naren/

 2) Run simple http server
    python -m SimpleHTTPServer

       default port in which simple http server will run is 8000
       if you want change port in which server runs
    python -m SimpleHTTPServer 5000

 3) open your browser and paste 127.0.0.1:8000/ in url bar or if you wnt to access your web      page from other system replace 127.0.0.0 with your server IP.

Theres another server CGIHTTPServer  this also works fine
Run using this command          python -m CGIHTTPServer

Few screen shots of the webpages