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, { PureComponent } from 'react'; | |
import { autobind } from 'core-decorators'; | |
export default class Button extends PureComponent { | |
@autobind | |
_handleOnClick (e) { | |
e.preventDefault(); | |
console.log('I was clicked!'); | |
} | |
render () { |
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 express = require('express'); | |
const helmet = require('helmet'); | |
const axios = require('axios'); | |
const bodyParser = require('body-parser') | |
const client = axios.create({ | |
baseURL: 'https://api.prosperworks.com/developer_api', | |
headers: { | |
'X-PW-AccessToken': process.env.COPPER_CRM_API_KEY, | |
'X-PW-Application': 'developer_api', |
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, { useState, useRef } from 'react'; | |
import { StyleSheet, View, KeyboardAvoidingView } from 'react-native'; | |
import { Image, ThemeProvider, Input, Button } from 'react-native-elements'; | |
import validator from 'validator' | |
import axios from 'axios' | |
import constants from './constants' | |
const { colors } = constants |
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
3:57:02 PM: Build ready to start | |
3:57:04 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774 | |
3:57:04 PM: build-image tag: v3.3.7 | |
3:57:04 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c | |
3:57:05 PM: Fetching cached dependencies | |
3:57:05 PM: Starting to download cache of 254.9KB | |
3:57:05 PM: Finished downloading cache in 164.787524ms | |
3:57:05 PM: Starting to extract cache | |
3:57:05 PM: Failed to fetch cache, continuing with build | |
3:57:05 PM: Starting to prepare the repo for build |
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
3:57:02 PM: Build ready to start | |
3:57:04 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774 | |
3:57:04 PM: build-image tag: v3.3.7 | |
3:57:04 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c | |
3:57:05 PM: Fetching cached dependencies | |
3:57:05 PM: Starting to download cache of 254.9KB | |
3:57:05 PM: Finished downloading cache in 164.787524ms | |
3:57:05 PM: Starting to extract cache | |
3:57:05 PM: Failed to fetch cache, continuing with build | |
3:57:05 PM: Starting to prepare the repo for build |
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
3:57:02 PM: Build ready to start | |
3:57:04 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774 | |
3:57:04 PM: build-image tag: v3.3.7 | |
3:57:04 PM: buildbot version: 11918e084194721d200458438c92ff8180b3b56c | |
3:57:05 PM: Fetching cached dependencies | |
3:57:05 PM: Starting to download cache of 254.9KB | |
3:57:05 PM: Finished downloading cache in 164.787524ms | |
3:57:05 PM: Starting to extract cache | |
3:57:05 PM: Failed to fetch cache, continuing with build | |
3:57:05 PM: Starting to prepare the repo for build |
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 express = require('express') | |
, { json } = require('body-parser') | |
, jwt = require('jsonwebtoken') | |
, to = require('await-to-js') | |
, model = require('./model'); // fake model | |
// This only lives on the server, never the client! | |
const JWT_SECRET = process.env.JWT_SECRET; | |
// create a server instance |
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 verifyJWT = async (req, res, next) => { | |
// Extract the authorization header | |
const header = req.get('Authorization'); | |
// If no authorization header is present, | |
// send back an error | |
if (!header) { | |
res.status(401).send({ | |
message: "Authorization required" | |
}); |
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 model = require('./model'); // our fake model | |
const verifyJWT = async (req, res, next) => { | |
// Extract the authorization header | |
const header = req.get('Authorization'); | |
let err | |
, secret | |
, id; | |
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
// ... | |
app.use((req, res, next) => { | |
req.foo = 'hello world'; | |
next(); | |
}); |