Skip to content

Instantly share code, notes, and snippets.

@SuryaSankar
Last active March 10, 2020 09:17
Show Gist options
  • Select an option

  • Save SuryaSankar/97e215097b2e915ea2afcd4e746eaf94 to your computer and use it in GitHub Desktop.

Select an option

Save SuryaSankar/97e215097b2e915ea2afcd4e746eaf94 to your computer and use it in GitHub Desktop.
Basic webpush app - db connection
app.config['SQLALCHEMY_DATABASE_URI'] = "sqlite://"
db = SQLAlchemy(app)
class PushSubscription(db.Model):
id = db.Column(db.Integer, primary_key=True, unique=True)
subscription_json = db.Column(db.Text, nullable=False)
db.create_all()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment