summaryrefslogtreecommitdiff
path: root/src/requests.ts
blob: 406127ff9d202cb6af8e60b230ab08da781c891f (plain)
1
2
3
4
5
6
7
8
9
10
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, delete: del } = requests;
export default requests;