Created
March 16, 2015 00:19
-
-
Save nadako/62ecfba4b6faf14a6c67 to your computer and use it in GitHub Desktop.
Flask/Haxe (https://pypi.python.org/pypi/Flask/0.10.1)
This file contains hidden or 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
import haxe.Constraints.Function; | |
@:pythonImport("flask", "Flask") | |
extern class Flask { | |
function new(module:String); | |
function run():Void; | |
function route<T:Function>(path:String):T->T; | |
} | |
class Main { | |
static function main() { | |
var app = new Flask(untyped __name__); | |
app.route("/")(index); | |
app.run(); | |
} | |
static function index() { | |
return "Hello, world!"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Generated python code: