I am trying to deploy a Flask application with Heroku. This is a simple API. Works fine with the wizard, but I get an error (log below) when running on the hero.
This is my application code (I know this, but look in one block, but I have problems to split it into files):
import flask import flask.ext.sqlalchemy import flask.ext.restless app = flask.Flask(__name__) app.config['DEBUG'] = True app.config['SQLALCHEMY_DATABASE_URI'] = 'mysql://user: password@server /db' db = flask.ext.sqlalchemy.SQLAlchemy(app) from sqlalchemy import Column, Integer, String, ForeignKey,\ Date, DateTime, Boolean, Float class fruits(db.Model): __tablename__ = 'fruits' id = Column(Integer, primary_key=True) name = Column(String(50),nullable=False) calories = Column(Integer, nullable=False) amount = Column(Integer, nullable=False) unit = Column(String(10),nullable=False) url = Column(String(100),nullable=True) @app.route('/') def hello_world(): return 'Hello World!'
This is the heroโs journal:
at=error code=H14 desc="No web processes running" method=GET path=/ host=blooming-taiga-1210.herokuapp.com fwd="188.33.19.82" dyno= connect= service= status=503 bytes=
and my Procfile file:
web: python __init__.py
source share