diff options
Diffstat (limited to 'src/requests.ts')
-rw-r--r-- | src/requests.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/requests.ts b/src/requests.ts new file mode 100644 index 0000000..2873b37 --- /dev/null +++ b/src/requests.ts @@ -0,0 +1,11 @@ +import axios from 'axios'; + +const baseURL = process.env.NODE_ENV === 'production' + ? 'PUT_PRODUCTION_URL_HERE' + : 'http://localhost:3030'; + +const requests = axios.create({ baseURL }); + +export const { get, post, put, patch } = requests; +export default requests; + |