Skip to content

Instantly share code, notes, and snippets.

// CryptoAnimal - interface we're extending with concrete instances and decorators
class CryptoAnimal {
// each animal has some sort of history that makes them who they are today
background() {
throw new Error('implement me pls');
}
// all of the things in that history make them less common
rarity() {
throw new Error('implement me pls');
@distrill
distrill / cowboy_trx.js
Last active November 6, 2019 22:24
transactional route connections, but no transaction wrangling anywhere in the business logic
const express = require('express');
const knex = require('knex')({
client: 'pg',
connection: {
user: 'dev',
password: 'dev',
database: 'dev',
},
});