Last active
March 10, 2020 18:53
-
-
Save almet/56b4a321a5db30a8a6bff286193a7bc4 to your computer and use it in GitHub Desktop.
roll split views
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 roll.extensions import simple_server | |
from .core import app | |
from . import view1, view2 # So that routes are scanned | |
simple_server(app, port=7777) |
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 roll import Roll | |
app = Roll() |
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 .core import app | |
@app.route("/over/the/rainbow", methods=["GET"]) | |
def main(request, response): | |
return "sing !" |
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 .core import app | |
@app.route("/", methods=["GET"]) | |
def main(request, response): | |
return "yeah" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment