Last active
January 18, 2020 18:54
-
-
Save hamaguchi-amago/b20dc2339aa5a63c5d903466e3deaf3c to your computer and use it in GitHub Desktop.
簡単なFlaskのサンプル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteRule ^(.*)$ /flask_sample/index.cgi/$1 [QSA,L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, World!' | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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