Hacker News new | past | comments | ask | show | jobs | submit login

Another useful one; Fire up a instant web-server from local folder on http://localhost:8080:

> python -m SimpleHTTPServer




Note that it has changed in python3

  > python3 -m http.server
  Serving HTTP on 0.0.0.0 port 8000 ...

  > python3 -m http.server 8080
  Serving HTTP on 0.0.0.0 port 8080 ...


Or if you use php (5.4 needed)

> php -S localhost:8080


Also in case you need to use another port (such as 5000):

> python -m SimpleHTTPServer 5000


smtp server one liner :

    $ sudo python -m smtpd -n -c DebuggingServer localhost:25




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: