diff options
author | eug-vs <eug-vs@keemail.me> | 2021-03-14 02:32:09 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2021-03-14 02:32:26 +0300 |
commit | 64a537425a05a15ecfac3bf314735876dbbd8ed7 (patch) | |
tree | 526d83464a470ee8311744b4736ae7545c0fcd30 /src/requests.ts | |
parent | cfb287490d353166cf0a3db7105d8002cc473f00 (diff) | |
download | commercel-ui-64a537425a05a15ecfac3bf314735876dbbd8ed7.tar.gz |
feat: pull Products from api
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; + |