This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!flask/bin/python | |
from flask import Flask, json, jsonify, make_response, request, abort, send_from_directory | |
from flask_cors import CORS, cross_origin | |
from flask_compress import * | |
from pprint import pprint | |
app = Flask(__name__, static_url_path='', static_folder='public') | |
cors = CORS(app, resources={r"/api/*": {"origins": "*"}}) | |
servers = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<notification> | |
<div id="snackbar"></div> | |
<script> | |
/* USAGE: | |
create an observable: | |
var globalEvents = riot.observable(); | |
And pull the trigger anywhere you need to: | |
globalEvents.trigger('notif_trigger', "Action done successfully"); | |
*/ | |
globalEvents.on('notif_trigger', function(data){ |