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
import React from 'react'; | |
import axios from 'axios'; | |
import Link from 'react-router-dom/Link'; | |
import qs from 'query-string'; | |
import Helmet from 'react-helmet'; | |
import { setToken } from '../utils/auth'; | |
import { | |
Page, | |
Block, | |
Card, |
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
{ | |
"version": "0.0.1", | |
"scripts": { | |
"start": "npm-run-all --parallel watch:server watch:build", | |
"watch:build": "NODE_ENV='development' webpack --watch", | |
"watch:server": "nodemon \"./build/server/main.js\" --watch \"./build/server\"" | |
}, | |
"devDependencies": { | |
"babel-core": "^6.20.0", | |
"babel-loader": "^6.2.9", |
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
return function apiErrorHandler(err, req, res, next) { | |
var status = err.status || err.statusCode || 500; | |
if (status < 400) status = 500; | |
res.statusCode = status; | |
var body = { | |
status: status | |
}; | |
// show the stacktrace when not in production |
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
'use strict' | |
const uuid = require('node-uuid') | |
class APIError extends Error { | |
constructor (opts) { | |
super(opts) | |
Error.captureStackTrace(this, APIError) | |
this.name = this.constructor.name || 'APIError' | |
this.code = opts.code || 500 |
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
/** | |
* This is converted from @palantir/blueprint's editable text. | |
* | |
* @see http://blueprintjs.com/docs/#components.editable | |
*/ | |
import React, {Component} from 'react' | |
import classNames from 'classnames' | |
import { clamp, safeInvoke } from '../utils' | |
import PureRender from "pure-render-decorator"; |
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
const fs = require('fs') | |
const path = require('path') | |
const models = path.join(__dirname, 'models') | |
fs.readdirSync(models) | |
.filter(file => ~file.indexOf('.js')) | |
.forEach(file => require(path.join(models, file))) |
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
import _ from 'lodash'; | |
import s from 'underscore.string'; | |
import chalk from 'chalk'; | |
import parseValidationError from './parse-validation-error'; | |
import sentry from './sentry'; | |
import config from '../config'; | |
// sentry supported log levels: |
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
import React, { Component } from 'react'; | |
import {withRouter} from 'react-router'; | |
import auth from '../auth'; | |
class Login extends Component { | |
constructor() { | |
super() | |
this.state ={ | |
error: true | |
}; |
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
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, | |
address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, | |
center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, | |
th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, | |
output, ruby, section, summary, time, mark, audio, video { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
font-size: 100%; | |
font: inherit; |