const RestClient = require('./rest-client')
const client = RestClient({ baseURL: 'https://mydomain.com' })
client.setAuthHeader('my-auth-token') // optional
const { data } = await client.get('/articles')
Node:
export DEBUG=rest-client
Browser:
localStorage.debug = 'rest-client'