Esempio n. 1
0
from index import app

if __name__ == "__main__":
    app.run('0.0.0.0')
Esempio n. 2
0
#  running part
from index import app

if __name__ == '__main__':
    app.run('0.0.0.0', port=5000)
Esempio n. 3
0
from index import app
app.run(host='0.0.0.0')
Esempio n. 4
0
import os
import sys
import logging

from index import app

if __name__ == "__main__":
    app.run(debug=True)
Esempio n. 5
0
from index import app

app.run(debug=True)
Esempio n. 6
0
from index import app

if __name__ == '__main__':
    app.debug = True
    app.run(host='0.0.0.0', port=8080)
Esempio n. 7
0
from index import app as application

if __name__ == "__main__":
    application.run(debug=False)
Esempio n. 8
0
from index import app as index_app

index_app.run(host='0.0.0.0', debug=True, port=5002)
#from index import app as index_app
#
Esempio n. 9
0
import argparse
from index import app

# Define variables arguments for the program

web_parser = argparse.ArgumentParser()

# Define variable arguments for Web Server

web_parser.add_argument(
    '-p',
    '--port',
    dest='port',
    action='store',
    help='This flag will start the web server on this port')
web_parser.add_argument(
    '-i',
    dest='ip',
    action='store',
    help='Provide a portrange to scan with a dash EX: 1-100')

server = web_parser.parse_args()

if __name__ == '__main__':
    app.run(host=server.ip, port=server.port)
Esempio n. 10
0
from index import app

app.run(host="localhost", port=5000, debug=True)
Esempio n. 11
0
from index import app as application

if __name__ == '__main__':
    application.run('0.0.0.0')
Esempio n. 12
0
from index import app

if __name__ == '__main__':
    app.run('0.0.0.0', 1080, debug=True)
Esempio n. 13
0
@app.route('/api/model/<data>', methods=['GET'])
def getModelRoute(data):
    array = []
    fileName = getModel(data)
    with open(fileName, 'r') as file:
        read = csv.reader(file, delimiter=',', quotechar='|')
        reader = iter(read)
        next(reader)
        next(reader)
        for line in reader:
            holder = [
                float(line[0]),
                float(line[1]),
                float(line[2]),
                ast.literal_eval(line[3]),
                float(line[4])
            ]
            array.append(holder)
    return jsonify({'data': array})


@app.route('/api/models', methods=['GET'])
def getAllModelRoute():
    data = getAllModels()
    return jsonify({'data': data})


if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000, threaded=True)
Esempio n. 14
0
from flask import request, render_template
from index import app, db
from models import Post


@app.route('/')
def hello_world():
    return 'Flask is working'


@app.route('/hello')
def new_route():
    return 'Routes are working too '


@app.route('/posts', methods=['GET', 'POST'])
def index():
    if request.method == 'POST':
        text = request.form['text']
        post = Post(text)
        db.session.add(post)
        db.session.commit()
    posts = Post.query.order_by(Post.date_posted.desc()).all()
    return render_template('index.html', posts=posts)


if __name__ == '__main__':
    app.run(debug=True, host='0.0.0.0')
Esempio n. 15
0
File: start.py Progetto: vipsql/paas
#coding:UTF-8

from index import app
  
if __name__ == "__main__":
    app.run(debug=True,host="0.0.0.0",port=8000)
Esempio n. 16
0
import sys
url = sys.path.insert(1, './src/')
from index import app

#Ejecución de la app
if __name__ == '__main__':
    '''
    debug = True para el entorno de desarrollo
    debug = False para el entorno de produccion
    '''
    app.run(debug=False)
Esempio n. 17
0
import os
os.environ['DATABASE_URI']='postgresql+psycopg2://admin:admin@localhost/sgptest'
from index import app
app.run()
Esempio n. 18
0
#coding:UTF-8

from index import app

if __name__ == "__main__":
    app.run(debug=True, host="0.0.0.0", port=8000)
Esempio n. 19
0
from index import app
app.debug = True
# app.run(host='0.0.0.0',port=80)
app.run(port=80)
Esempio n. 20
0
from index import app, host, port

if __name__ == '__main__':
    app.run(host, port, debug=True)
Esempio n. 21
0
from index import app

app.run(host='0.0.0.0', debug=True)
Esempio n. 22
0
import os
from index import app

if __name__ == "__main__":
    port_number = os.getenv("PORT", 5000)
    app.run(host='0.0.0.0', port=port_number, debug=False)
Esempio n. 23
0
# coding: utf-8
# authorL jiankaiwang (http://jiankaiwang.no-ip.biz/)

from index import app as application

if __name__ == "__main__":
    application.run()
Esempio n. 24
0
from index import app
from config import SECRET_KEY as key
from flask_cors import CORS
import sys
# Run the app
CORS(app)
port = 5000
if len(sys.argv) == 2:
    port = int(sys.argv[1])
# Run the app
if __name__ == '__main__':
    app.secret_key = key
    app.run(debug=True, port=port)
Esempio n. 25
0
from index import app


if __name__ == "__main__":
    app.run()

Esempio n. 26
0
from index import app
if __name__ == "__main__":
    app.run('0.0.0.0', debug=True)