Skip to content

Instantly share code, notes, and snippets.

View mmadden's full-sized avatar

Matt Madden mmadden

  • Ontario, Canada
View GitHub Profile
@mmadden
mmadden / hapi-boom-json-api.js
Last active August 29, 2015 14:26
hapi plugin to reformat boom errors to json-api
exports.register = function (plugin, options, done) {
plugin.ext('onPreResponse', function (request, reply) {
var response = request.response;
if (response.isBoom) {
var error = {
title: response.output.payload.error,
status: response.output.statusCode,
detail: response.output.payload.message
@mmadden
mmadden / ember-file-org.md
Last active January 1, 2016 13:59
@wagenet asked for details on how I like files to be organized in Ember applications.
app/
  app.js
  application.hbs
  routing.js
  components/
    dropdown-button/
      dropdown-button.hbs
      DropdownButtonComponent.js
 google-map/