예제 #1
0
def run():
    """Run development server"""
    # Retrieve port from environment, if none available, use 8080
    # Allows flexibility for servers that don't use fixed outgoing ports
    port = int(os.environ.get('PORT', 8080))
    # Start application development server
    app.run(host='0.0.0.0', port=port)
예제 #2
0
파일: manage.py 프로젝트: ffeelliiggoo/blog
def run():
    """Run development server"""
    # Retrieve port from environment, if none available, use 8080
    # Allows flexibility for servers that don't use fixed outgoing ports
    port = int(os.environ.get('PORT', 8080))
    # Start application development server
    app.run(host='0.0.0.0', port=port)
예제 #3
0
파일: run.py 프로젝트: alanhdu/blog
def serve():
    """Host blog on http://localhost:5000"""
    app.config["BLOG"]["posts"] = sorted(load(["posts", "drafts"]),
                                         key=lambda post: post.revdate,
                                         reverse=True)
    app.config["BLOG"]["base_path"] = "/"
    app.run(debug=True)
예제 #4
0
#!/usr/bin/env python
from blog import app
import os
app.debug = True
if __name__ == '__main__':
  port = int(os.environ.get("PORT", 5001))
  app.run(port=port,host='0.0.0.0')
예제 #5
0
from blog import app

if __name__ == "__main__":
    app.run(debug=True, host="0.0.0.0")
예제 #6
0
파일: run.py 프로젝트: logston/plog-work
from blog import app


if __name__ == "__main__":
    import argparse
    parser = argparse.ArgumentParser(description='Development Server Help')
    parser.add_argument("-d", "--debug", action="store_true", dest="debug_mode",
                        help="run in debug mode (for use with PyCharm)", default=False)
    parser.add_argument("-p", "--port", dest="port",
                        help="port of server (default:%(default)s)", type=int, default=11917)

    cmd_args = parser.parse_args()
    app_options = {"port": cmd_args.port, 'host': '0.0.0.0', 'threaded': True}

    if cmd_args.debug_mode:
        app_options["debug"] = False
        app_options["use_debugger"] = False
        app_options["use_reloader"] = False

    app.run(**app_options)
예제 #7
0
from blog import app



if __name__ == '__main__':
	app.run(debug=True)
//
예제 #8
0
#!/usr/bin/env python

import os
import os.path

from database import init_db
from blog import app, DATABASE, JDBC_URL, JDBC_DRIVER

if __name__ == "__main__":
    if not os.path.exists(DATABASE):
        init_db(JDBC_URL, JDBC_DRIVER)
    app.run(host="0.0.0.0", port=18080)
예제 #9
0
from blog import app

if __name__ == '__main__':
    app.config['SECRET_KEY'] = 'key'
    app.run(debug=True, port=5001)
예제 #10
0
from blog import app, manager

if __name__ == '__main__':
    #manager.run()
    app.run(host="0.0.0.0", debug=True)
예제 #11
0
from blog import app


if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True, port=80)
예제 #12
0
파일: manage.py 프로젝트: jlybianto/blogful
def run():
  # Attempt to retrieve a port number from environment - 8080 if unavailable
  # Number of hosts use the PORT environment variable to tell the app
  port = int(os.environ.get('PORT', 8080))
  app.run(host='0.0.0.0', port=port)
예제 #13
0
# @app.route('/login')
# @oidc.require_login
# def login():
# 	return 'Welcome {}!! Livinig in {}'.format(oidc.user_getfield('email'), oidc.user_getfield('address'))
#
# @app.route('/custom_callback')
# @oidc.custom_callback
# def callback(data):
# 	return 'Hello. You submitted %s' % data
#
#
# if __name__ == '__main__':
# 	context = None
# 	if app.config['BASE'].startswith("https"):
# 		context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
# 		context.load_cert_chain(app.config['SERVER_CERT'], app.config['SERVER_KEY'])
#
# 	app.run(ssl_context=context, host='127.0.0.1', port=8043, debug=True)

from blog import app
import ssl

if __name__ == '__main__':
    context = None
    if app.config['BASE'].startswith("https"):
        context = ssl.SSLContext(ssl.PROTOCOL_SSLv23)
        context.load_cert_chain(app.config['SERVER_CERT'],
                                app.config['SERVER_KEY'])

    app.run(ssl_context=context, host='127.0.0.1', port=8043, debug=True)
예제 #14
0
from blog import app

if __name__ == '__main__':
    app.run(host='127.0.0.1', port=8080, debug=True)
예제 #15
0
from blog import app

if __name__ == '__main__':
    app.run(host="0.0.0.0", port="5000", debug=True)
예제 #16
0
#__init__で作成されるアプリケーションを読み込む
from blog import app

if __name__ == "__main__":
    app.run(port=9999)
예제 #17
0
#!/usr/bin/env python
from blog import app
import os

app.debug = True
if __name__ == '__main__':
    port = int(os.environ.get("PORT", 5001))
    app.run(port=port, host='0.0.0.0')
예제 #18
0
def run():
    #try to retrieve a port number from environment, falling back to 5000 if unvailable
    port = int(os.environ.get('PORT', 5000))
    #run the development server, telling it to listen to the port retrieved
    app.run(host='0.0.0.0', port=port)
    """
예제 #19
0
from blog import app
import blog.views

if __name__ == "__main__":
    app.run(host=app.config['HOST'], port=app.config['PORT'])
예제 #20
0
파일: manage.py 프로젝트: jdingus/blog
def run():
    port = int(os.environ.get('PORT', 5000))
    app.run(host='localhost', port=port)
예제 #21
0
def run():
    #try to retrieve a port number from environment, falling back to 5000 if unvailable
    port = int(os.environ.get('PORT', 5000))
    #run the development server, telling it to listen to the port retrieved
    app.run(host='0.0.0.0', port=port)
    """
예제 #22
0
파일: wsgi.py 프로젝트: logston/plog-work
from blog import app

if __name__ == '__main__':
    app.run()
예제 #23
0
from blog import app
#  parla proprio di "app variable"
import os

#   enable to use on heroku, disable otherwise

app.secret_key = os.urandom(24)
port = int(os.environ.get("PORT", 5000))

app.run(host="0.0.0.0", port=port, debug=True)
#   heroku ci fornisce una variabile ambintale che è la porta su cui facciamo girare la app

#   enable to use locally, disable otherwise
# app.run(debug=True)
예제 #24
0
파일: debug.py 프로젝트: ahri/nodeblog
#!/usr/bin/env python
# coding: utf-8
from blog import app as application
if __name__ == "__main__":
    application.debug = True
    application.run(host='0.0.0.0', port=8000)
예제 #25
0
파일: run.py 프로젝트: salimep/docker
from blog import app
from blog import route
from blog import forms
from blog import model

if __name__ == "__main__":
    app.run(host='0.0.0.0', debug=True)
예제 #26
0
파일: manage.py 프로젝트: BostonREB/blog
def run():
    port = int(os.environ.get('PORT', 5001))
    app.run(host='127.0.0.1', port=port)
예제 #27
0
def run():
    port = int(os.environ.get('PORT', 8080))
    app.run(host='0.0.0.0', port=port)
예제 #28
0
파일: wsgi.py 프로젝트: uzoma-u/flask-blog
from blog import app as application

if __name__ == "__main__":
    application.run(debug=True)
예제 #29
0
from blog import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=5000)
예제 #30
0
from blog import app, models, db


@app.shell_context_processor
def shell_vars():
    vars = {'app': app, 'models': models, 'db': db}
    return vars


app.run(port=5000)
예제 #31
0
def runserver():
    app.run(host='0.0.0.0')
예제 #32
0
파일: run.py 프로젝트: okcorral/python
from blog import app
import os

app.secret_key = os.urandom(24)

# running locally:
# app.run(debug=True)

# running on heroku
port = int(os.environ.get("PORT", 5000))
app.run(host='0.0.0.0', port=port)
예제 #33
0
from blog import app

if __name__ == '__main__':
    app.run(DEBUG=True)
예제 #34
0
def run():
	port = int(os.environ.get('Port', 5000))
	app.run(host='0.0.0.0', port = port)
예제 #35
0
def run():
    port = int(os.environ.get('PORT', 8080)) #environ dictionary from os to get access to environment variables
    app.run(host='0.0.0.0', port=port)
예제 #36
0
from blog import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', debug=True, threaded=True, port=8100)
예제 #37
0
from blog import app
import os

if __name__=="__main__":
    app.run(host='0.0.0.0', port=os.getenv('PORT'))
예제 #38
0
from blog import app

if __name__ == "__main__":
    app.run(debug=True, host="0.0.0.0", port=80)
예제 #39
0
from blog import app, config

app.run(host=config.HOST, port=config.PORT, debug=config.DEBUG)
예제 #40
0
from blog import app

if __name__ == '__main__':
    app.run(debug=True, port=int('12345'))
예제 #41
0
import config  # import neo4j config
from blog import app
import os

app.secret_key = os.urandom(24)
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
예제 #42
0
# -*- coding: utf-8 -*-

from blog import app

app.run(debug=app.config['DEBUG'], host=app.config['HOST'])
예제 #43
0
파일: server.py 프로젝트: cryptojuice/YABS
from blog import app

if __name__ == "__main__":
    app.run(debug=True, host="0.0.0.0", port=18000)
예제 #44
0
# -*- coding: utf-8 -*-

import sys
reload(sys)
sys.setdefaultencoding("utf-8")


from blog import app
import os

app.secret_key = os.urandom(24)
port = int(os.environ.get('PORT', 5001))
app.run(host='0.0.0.0', port=port, debug=True)
예제 #45
0
파일: run.py 프로젝트: nicolewhite/nothing
from blog import app
import os

app.secret_key = os.urandom(24)
port = int(os.environ.get("PORT", 5000))
app.run(host="0.0.0.0", port=port)
예제 #46
0
# coding: utf-8
from blog import app

if __name__ == "__main__":
    app.run(host="139.129.23.184", port=5000)
예제 #47
0
from blog import app
import os

app.secret_key = os.urandom(24)
port = int(os.environ.get('PORT', 5000))

app.run(host="0.0.0.0", port=port)
예제 #48
0
#!/usr/bin/python3
#coding=utf8

from blog import app

if __name__ == '__main__':
    app.run(host='0.0.0.0', port=80, debug=True)
예제 #49
0
from blog import app

if __name__ == "__main__":
    app.run(debug=True, host='0.0.0.0')
예제 #50
0
def run():
    port = int(os.environ.get('PORT', 8000))
    app.run(host='0.0.0.0', port=port, debug=True)
예제 #51
0
from blog import app
import os

app.secret_key = os.urandom(24)
app.config['DEBUG'] = True
port = int(os.environ.get('PORT', 5000))
app.run(host='localhost', port=port)
예제 #52
0
from blog import app as application

if __name__ == "__main__":
    application.run(host="0.0.0.0")
예제 #53
0
파일: manage.py 프로젝트: ygq/blog
#conding = utf-8
from blog import app
if __name__ == '__main__':
    app.run(debug=True)
예제 #54
0
def run():
    """Start the flask app"""
    port = int(os.environ.get('PORT', 8080))
    app.run(host='0.0.0.0', port=port)
예제 #55
0
    flash('You are not a Authenticated User')
    return redirect(url_for('index'))


@app.route('/logout')
def logout():
    session.clear()
    session['user_available'] = False
    oidc.logout()
    return redirect(url_for('index'))


@app.route('/blog/api/v0.1/posts', methods=['GET'])
def get_tasks():
    posts = Posts.query.all()
    """for i in api_posts:
		title= i.title
		description = i.description
		data_dict= {'title': title, 'description': description}"""
    """for i in posts:
		t[i] = posts.title
	print(t)"""
    title = posts.title
    print(title)
    description = posts.description
    return jsonify(title=title, description=description)


if __name__ == '__main__':
    app.run()
예제 #56
0
def run():
    port = int(os.environ.get("PORT", 8080))
    app.run(host="0.0.0.0", port=port)
예제 #57
0
def run():
    port = int(os.environ.get('PORT', 8080))
    app.run(host='0.0.0.0', port=port)
예제 #58
0
#!/usr/bin/env python

from blog import app

app.run("0.0.0.0")