Exemple #1
0
import os

# from apscheduler.schedulers.background import BackgroundScheduler

import logging
logging.basicConfig()

import ccLib

OK = 'okay'

app = Flask(__name__, static_url_path='')
app.debug = True
app.config.from_object('config')
app.ccConfig = {}
app.ccState = {}
app.state = {'ip': ccLib.getMyIPAddress()}

app.aws = ccLib.AWS()
app.aws.createKeypairs()
app.aws.pushSecurityGroups('worker')

app.queue = ccLib.Job

app.session = ccLib.initDB()

@app.route('/')
def index():
    """ Return the main html page. """
    # return 'hello'
    return app.send_static_file('index.html')