How to install Flask

How to install Flask

tar -xzf Flask-*.tar.gz
cd Flask-*


python2.6 install --user

Update your .htaccess with the following lines:

vi .htaccess

AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.fcgi/$1 [QSA,L]

Update your index.fcgi with the following lines:

vi index.fcgi

#!/usr/bin/env python2.6
from flask import Flask
from flup.server.fcgi import WSGIServer
app = Flask(__name__)
def hello():
    return "Hello world!"

Set an executable permissions

chmod +x index.fcgi

Probably you will need to manually install FLUP

mkdir temp
cd temp
tar -xvf flup-1.0.2.tar.gz
cd flup-1/
python2.6 install --user

Similar Posts:

Leave a Reply

Your email address will not be published.