This file contains hidden or 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
function MyObject(val) { | |
this.val = val; | |
this.myCallback = this.myCallback.bind(this); // or lodash.bindall(this, 'myCallback'); | |
} | |
MyObject.prototype.myCallback = function(err, data){ | |
console.log(err,data); | |
console.log(this.val); | |
}; |
This file contains hidden or 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
from flask import Flask | |
from flask.ext.hopak import FlaskHopak | |
from flask.ext.pymongo import PyMongo | |
import models | |
def create_app(): | |
# Create flask app | |
app = Flask(__name__) |