Created
December 15, 2016 00:44
-
-
Save Arfey/ce7170b2cf67be32524da7b3df82e787 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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