Just write this
python -m SimpleHTTPServer 8000
and you're done.
Go in the browser, type localhost:8000 in the addresses bar and you will see the file in the current directory. If there is an html file or an image file, simple click on it and you'll have the html file or the image rendered.
Python 3
For python 3 is different:
go in the dir where you have the html file, open cmd from there and write:
python -m http.server
and you've finished.
Go in the browser, type in the address bar:
localhost:8000
and you will see the index.html file.
Comments
Post a Comment