Skip to content

Instantly share code, notes, and snippets.

@Arfey
Created December 15, 2016 00:44
Show Gist options
  • Save Arfey/ce7170b2cf67be32524da7b3df82e787 to your computer and use it in GitHub Desktop.
Save Arfey/ce7170b2cf67be32524da7b3df82e787 to your computer and use it in GitHub Desktop.
import fetch from 'isomorphic-fetch';
import { canUseDOM } from 'fbjs/lib/ExecutionEnvironment';
const port = 8000;
const host = canUseDOM ? '': `http://0.0.0.0:${port}`;
export default function customFetch(url, options, action) {
return fetch(host + url, options);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment