Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the --install option instead of sudo. #1072

Merged
merged 1 commit into from Jan 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 11 additions & 23 deletions docs/site/index.html
Expand Up @@ -66,31 +66,19 @@ <h2>Documentation</h2>
<div class="tab-box active" data-tab="quickstart">
<h1>Installation</h1>
<p>
Here's a quick rundown on how to get started with Gunicorn. For more detail read the documentation.
Here's a quick rundown on how to get started with Gunicorn. For more details read the <a href="http://docs.gunicorn.org/en/stable/">documentation</a>.
</p>
<pre>
$ sudo pip install virtualenv
$ mkdir ~/environments/
$ virtualenv ~/environments/tutorial/
$ cd ~/environments/tutorial/
$ ls
bin include lib
$ source bin/activate
(tutorial) $ pip install gunicorn
(tutorial) $ mkdir myapp
(tutorial) $ cd myapp/
(tutorial) $ vi myapp.py
(tutorial) $ cat myapp.py

def app(environ, start_response):
data = b"Hello, World!\n"
start_response("200 OK", [
("Content-Type", "text/plain"),
("Content-Length", str(len(data)))
])
return iter([data])

(tutorial) $ ../bin/gunicorn -w 4 myapp:app
$ pip install gunicorn
$ cat myapp.py
def app(environ, start_response):
data = b"Hello, World!\n"
start_response("200 OK", [
("Content-Type", "text/plain"),
("Content-Length", str(len(data)))
])
return iter([data])
$ gunicorn -w 4 myapp:app
[2014-09-10 10:22:28 +0000] [30869] [INFO] Listening at: http://127.0.0.1:8000 (30869)
[2014-09-10 10:22:28 +0000] [30869] [INFO] Using worker: sync
[2014-09-10 10:22:28 +0000] [30874] [INFO] Booting worker with pid: 30874
Expand Down