Skip to content

Instantly share code, notes, and snippets.

View mitchellbusby's full-sized avatar

Mitchell Busby mitchellbusby

View GitHub Profile
@mitchellbusby
mitchellbusby / logging.conf
Created August 2, 2016 10:30 — forked from wrunk/logging.conf
Getting setup with proper python logging
# ---------------------------------------------------------------------------- #
# Standard setup stuff. In general you will want to alter the formatters
#
[formatters]
keys: detailed,simple
[handlers]
keys: console
[formatter_simple]
import db from '../database';
class Item {
static fetch(user_id) {
return // make sure you return the promise so it can be seen by the outer method!
db.query("select * from items where user_id = $1", user_id)
.then(function (result) {
// This result object obvs comes from the $promise.resolve(result); that would happen within query.
// Lets pretend result is the string "Hello world"
console.log(result);