Skip to content

Instantly share code, notes, and snippets.

@hamaguchi-amago
Last active January 18, 2020 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hamaguchi-amago/b20dc2339aa5a63c5d903466e3deaf3c to your computer and use it in GitHub Desktop.
Save hamaguchi-amago/b20dc2339aa5a63c5d903466e3deaf3c to your computer and use it in GitHub Desktop.
簡単なFlaskのサンプル
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /flask_sample/index.cgi/$1 [QSA,L]
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello, World!'
#! /home/XXXX/.linuxbrew/bin/python
from wsgiref.handlers import CGIHandler
from helloFlask import app
CGIHandler().run(app)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment