#Installing ngrok on OSX
- Download ngrok
- Unzip it to your Applications directory
- Create a symlink (instructions below)
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory| import {ApolloClient, HttpLink, from, fromPromise} from '@apollo/client'; | |
| import {setContext} from '@apollo/client/link/context'; | |
| import {RetryLink} from '@apollo/client/link/retry'; | |
| import {onError} from '@apollo/client/link/error'; | |
| import {refresh} from 'react-native-app-auth'; | |
| import AsyncStorage from '@react-native-async-storage/async-storage'; | |
| import {getTokenSync, getToken} from '../../utils/getToken'; | |
| import {test_config, prod_config} from '../../utils/efaasConfig'; |
| // Add any other logic here as needed. | |
| import { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin'; | |
| import { CacheFirst } from 'workbox-strategies/CacheFirst'; | |
| import { createHandlerForURL } from 'workbox-precaching/createHandlerForURL'; | |
| import { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin'; | |
| import { NavigationRoute } from 'workbox-routing/NavigationRoute'; | |
| import { precacheAndRoute } from 'workbox-precaching/precacheAndRoute'; | |
| import { registerRoute } from 'workbox-routing/registerRoute'; |
| /** | |
| * @desc It triggers mouse event. | |
| * @param {HTMLElement} element target DOM element | |
| * @param {string} type type of event | |
| * @param {number} x clientX of event | |
| * @param {number} y clientY of event | |
| */ | |
| export function simulateEvent(element, type, x, y) { | |
| const mouseEvent = new MouseEvent(type, { | |
| screenX: 0, |
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express') | |
| , routes = require('./routes') | |
| , user = require('./routes/user') | |
| , http = require('http') | |
| , path = require('path'); |
| http { | |
| upstream app-pc { | |
| server 127.0.0.1:8001; | |
| } | |
| upstream app-mobile { | |
| server 127.0.0.1:8002; | |
| } | |
| server { |
#Installing ngrok on OSX
Run the following two commands in Terminal to create the symlink.
# cd into your local bin directory| /** | |
| * Compares two software version numbers (e.g. "1.7.1" or "1.2b"). | |
| * | |
| * This function was born in http://stackoverflow.com/a/6832721. | |
| * | |
| * @param {string} v1 The first version to be compared. | |
| * @param {string} v2 The second version to be compared. | |
| * @param {object} [options] Optional flags that affect comparison behavior: | |
| * <ul> | |
| * <li> |
| axios.put(this.apiBaseEndpoint + '/' + id, input) | |
| .then((response) => { | |
| // Success | |
| }) | |
| .catch((error) => { | |
| // Error | |
| if (error.response) { | |
| // The request was made and the server responded with a status code | |
| // that falls out of the range of 2xx | |
| // console.log(error.response.data); |