This file contains 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
//node/express server routes for editing | |
// edit a post | |
router.get('/a/:id/edit', function(req, res) { | |
Post.findById(req.params.id, function(err, post) { | |
if (err) { | |
res.send(err); | |
} else { | |
res.render('createPost', { |
This file contains 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
var fs = require('fs'); | |
var path = require('path'); | |
var simple = require('simplify-js'); | |
var geolib = require('geolib'); | |
fs.readFile(path.join(__dirname, 'map.geojson'), 'utf8', function(err, data) { | |
// var jsonPoints = data; |
This file contains 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
var LoginStore = require('../stores/LoginStore'); | |
var LoginActions = require('../actions/LoginActions'); | |
var Login = React.createClass({ | |
getInitialState: function () { | |
return { | |
expanded: false, | |
username: '', |
This file contains 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
constants = require('../constants/constants') | |
AppDispatcher = require('../dispatchers/appDispatcher') | |
ApiHelper = require('../helpers/ApiHelper') | |
LoginActionsCreators = { | |
# user actions | |
loginUser: (username, password) -> |
This file contains 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
merge = require('react/lib/merge') | |
EventEmitter = require('events').EventEmitter | |
AppDispatcher = require('../dispatchers/appDispatcher') | |
constants = require('../constants/constants') | |
CHANGE_EVENT = 'change' | |
_currentUser = null | |
_authToken = null | |
_exp = null |
This file contains 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
/* @flow */ | |
import idx from 'idx'; | |
if (typeof window !== 'undefined' && window.Rollbar) { | |
// TODO some way to disable console output. This seems to require a PR to rollbar's lib. | |
const { Rollbar } = window; | |
const nativeConsoleError = console.error; | |
// $FlowFixMe | |
console.error = (...args) => { | |
// If there's an error passed to the console, we want to use thar directly to preserve the stacktrace |
This file contains 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
/* @flow */ | |
import idx from 'idx'; | |
const regexsToIgnore = [ | |
/Request blocked by client, probably adblock.*Branch/gi, // Branch init | |
/Request timed out.*Branch/gi, // Branch init | |
/GoogleAPI.*popup_closed_by_user/gi, // google auth | |
/GoogleAPI.*access_denied/gi, // google auth | |
/unhandled rejection was null or undefined/gi, | |
/script error/gi, |
This file contains 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
/* @flow weak */ | |
import { transform, checkIgnore } from '../setupErrorLogging'; | |
describe('setupErrorLogging', () => { | |
const errorsToSend = [ | |
{ | |
body: { | |
trace: { | |
exception: { | |
message: 'Received 401 after finding a window user', |
This file contains 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
<%_ if (!__DEV__ && !__FUNCTIONAL__) { _%> | |
<script> | |
var _rollbarConfig = { | |
accessToken: "xyz", | |
captureUncaught: true, | |
captureUnhandledRejections: true, | |
reportLevel: 'error', | |
payload: { | |
environment: '<%= ROLLBAR_ENVIRONMENT %>', | |
release: '<%= VERSION %>', |
This file contains 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
// -------------------------------------------------- | |
// rollbar.ejs | |
// -------------------------------------------------- | |
<%_ if (!__DEV__ && !__FUNCTIONAL__) { _%> | |
<script> | |
var _rollbarConfig = { | |
accessToken: "37c613c5a8b34fba89cd4fcfebc76808", | |
captureUncaught: true, | |
captureUnhandledRejections: true, | |
reportLevel: 'error', |
OlderNewer