Skip to content

Commit

Permalink
Actually pay attention to the commandline
Browse files Browse the repository at this point in the history
  • Loading branch information
nickstenning committed Jun 16, 2012
1 parent 6e0a392 commit 515b0f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
*.pyc
*.egg-info
12 changes: 6 additions & 6 deletions goldenarch/core.py
Expand Up @@ -13,17 +13,17 @@
import static

PORT = os.environ.get('PORT', 8000)
STATIC_DIR = sys.argv[1]


app = static.Cling(STATIC_DIR)

def app(static_dir):
return static.Cling(static_dir)

def cli():
print 'Serving crap. Fast.'

static_dir = sys.argv[1]

argv = [
'gunicorn', 'goldenarch:app',
'gunicorn', 'goldenarch:app("{dir}")'.format(dir=static_dir),
'-b', '0.0.0.0:{port}'.format(port=PORT),
'-w', '16', '-k', 'gevent', '-t', '2',
'--name', 'goldenarch'
Expand All @@ -33,4 +33,4 @@ def cli():


if __name__ == '__main__':
cli()
cli()

0 comments on commit 515b0f9

Please sign in to comment.