Change dir to sdk tools bin
cd %ANDROID_SDK_ROOT%/tools
List and get device name
emulator -list-avds
Now you have list of available avds, copy one of the avd name and do next step
Launch the emulator
import axios from 'axios'; | |
import {notifier} from './util'; | |
axios.interceptors.response.use(undefined, function (error) { | |
const statusCode = error.response ? error.response.status : null; | |
if (statusCode === 404) { | |
notifier.error('The requested resource does not exist or has been deleted') | |
} |
import axios from 'axios'; | |
import {notifier} from './util'; | |
// errorComposer will compose a handleGlobally function | |
const errorComposer = (error) => { | |
return () => { | |
const statusCode = error.response ? error.response.status : null; | |
if (statusCode === 404) { | |
notifier.error('The requested resource does not exist or has been deleted') | |
} |
import axios, {AxiosError} from 'axios'; | |
import {notifier} from './util'; | |
interface ComposedError { | |
readonly message: string; | |
readonly error: AxiosError; | |
handleGlobally(): void; | |
getError(): AxiosError; | |
} |
import axios from 'axios'; | |
import {notifier} from './util'; | |
// Fetch some missing information | |
axios.get('/api/articles/not-found').then(resp => { | |
// So something with article information | |
}).catch(error => { | |
const statusCode = error.response ? error.response.status : null; |
Check that the device is reconnected to the machine with: | |
`adb devices` | |
Reroute the connection to the development server with: | |
`adb reverse tcp:8081 tcp:8081` |
Change dir to sdk tools bin
cd %ANDROID_SDK_ROOT%/tools
List and get device name
emulator -list-avds
Now you have list of available avds, copy one of the avd name and do next step
Launch the emulator
$ cd <application name>
Where is the dir where you have the .env
file.
heroku config:set $(cat .env | sed '/^$/d; /#[[:print:]]*$/d')
const {Storage} = require('@google-cloud/storage'); | |
const fromB64 = (string) => Buffer.from(string, 'base64').toString(); | |
const credentials = JSON.parse(fromB64(process.env.GCLOUD_CREDENTIALS)) | |
const storage = new Storage(credentials ? {credentials} : undefined) |
// for multiple requests | |
let isRefreshing = false; | |
let failedQueue = []; | |
const processQueue = (error, token = null) => { | |
failedQueue.forEach(prom => { | |
if (error) { | |
prom.reject(error); | |
} else { | |
prom.resolve(token); |