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
/** | |
* async/await | |
*/ | |
import request from 'request' | |
import express from 'express' | |
import { GraphQLError } from 'graphql/error' | |
import { STRIPE_API_KEY } from '../configs' | |
const server = express() | |
const TOKEN_URI = 'https://connect.stripe.com/oauth/token' |
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
{"lastUpload":"2020-10-06T22:48:06.882Z","extensionVersion":"v3.4.3"} |
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
{ | |
"presets": ["node8"], | |
"plugins": [ | |
["module-resolver", { | |
"root": ["."], | |
"alias": { | |
"~": "./server" | |
} | |
}] | |
] |
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
function LoadScript(src) { | |
return new Promise((resolve, reject) => { | |
const script = document.createElement('script') | |
script.src = src | |
script.addEventListener('load', resolve) | |
script.addEventListener('error', reject) | |
document.body.appendChild(script) | |
}) |
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
{ | |
"extends": [ | |
"airbnb", | |
"prettier", | |
"prettier/react" | |
], | |
"plugins": [ | |
"prettier" | |
], | |
"parser": "babel-eslint", |
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
/** | |
* server/dataSources/Auth.js | |
* Auth implementation, it's not really a dataSource so it doesn't need to be here | |
*/ | |
const { authenticate, createJwt } = require('../lib/passport'); | |
const { ON_HTTPS } = require('../configs'); | |
const ONE_MINUTE = 1000 * 60; | |
const ONE_DAY = ONE_MINUTE * 60 * 24; | |
const ONE_MONTH = ONE_DAY * 30; |
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
source $HOME/.bash_profile | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/lalvarezd/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME |
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
import { | |
useCallback, | |
useEffect, | |
useRef, | |
useState, | |
type DependencyList, | |
} from "react" | |
export interface Atom<Value> | |
extends Readonly<{ |