Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jeasonfire on github.
  • I am jeasonfire (https://keybase.io/jeasonfire) on keybase.
  • I have a public key whose fingerprint is FF61 CDA6 3E2F FE86 06DF 5D95 7C4F BB82 1771 ACCB

To claim this, I am signing this object:

@Jeasonfire
Jeasonfire / Quick Python Server
Created September 25, 2015 21:47
A quick way to host a server using Python.
Here are the instructions on how to quickly host a local server.
Maybe you need a server for some webdev thing and you haven't set up one yet?
1. Get Python 2.x or 3.x. (https://www.python.org/)
2. Navigate to a desired directory in your terminal. This will be the directory that will be accessed when connecting to this server.
3. If you have Python 2.x, continue, if you have 3.x, skip to step 4.
- Run the command "python -m SimpleHTTPServer port". (Replace the "port" with the port you want to use, eg. 8080)
4. If you have Python 3.x, continue, if you have 2.x, you're done already!
- Run the command "python -m http.server port". (Replace the "port" with the port you want to use, eg. 8080)