Skip to content

Instantly share code, notes, and snippets.

const express = require('express')
const app = express()
const port = 3500
app.get('/promise/resolved', (req, res) => {
testPromiseResolved().then(response => res.json(response)).catch(e => next(e))
})
app.get('/promise/rejected', (req, res, next) => {
@TNowalk
TNowalk / gist:7595a28d406f515b3302
Created February 10, 2015 04:12
Suit and Card Class
// Suit class
var Suit = function(name, abbr, char) {
this.name = name;
this.abbr = abbr;
this.char = char;
};
var suits = {
clubs: new Suit('Clubs', 'C', '♣'),
diamonds: new Suit('Diamonds', 'D', '♦'),