Skip to content

Instantly share code, notes, and snippets.

@corydolphin
Created March 3, 2013 23:55
Show Gist options
  • Save corydolphin/5078956 to your computer and use it in GitHub Desktop.
Save corydolphin/5078956 to your computer and use it in GitHub Desktop.
Create simple HTTP Server as .bat script. Put it somewhere on your path, and simply type ```server [port=8000]``` to spin up a web server.
@ECHO OFF
:: Written by Cory Dolphin (@wcdolphin www.corydolphin.com)
:: Simple bat script to start a simple Python server in the current directory
:: Usage: server [port <default = 8000>]
if "%1" =="" ( :: no parameter, default port
python -m SimpleHTTPServer 8000
) else ( :: use specified port
python -m SimpleHTTPServer %1
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment