Skip to content

Instantly share code, notes, and snippets.

@promediacorp
Created November 5, 2014 18:09
Show Gist options
  • Save promediacorp/be371850839b00ffcfa8 to your computer and use it in GitHub Desktop.
Save promediacorp/be371850839b00ffcfa8 to your computer and use it in GitHub Desktop.
Flask server for Googlebot Demo
# -*- coding: utf-8 -*-
from flask import Flask, render_template, request
app = Flask(__name__)
@app.route("/")
def start():
return render_template("index.html")
@app.route("/moby")
def moby():
return "There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me."
@app.route("/moby2")
def moby2():
return "There now is your insular city of the Manhattoes, belted round by wharves as Indian isles by coral reefs—commerce surrounds it with her surf."
if __name__ == "__main__":
app.run("0.0.0.0", port=80, debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment