mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-26 21:37:40 +00:00
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com> Co-authored-by: 谨欣 <echo.cmy@antgroup.com> Co-authored-by: 严志勇 <yanzhiyong@tiansuixiansheng.com> Co-authored-by: yanzhiyong <932374019@qq.com>
15 lines
242 B
TypeScript
15 lines
242 B
TypeScript
import axios from 'axios';
|
|
|
|
const api = axios.create({
|
|
baseURL: process.env.API_BASE_URL,
|
|
});
|
|
|
|
api.defaults.timeout = 10000;
|
|
|
|
api.interceptors.response.use(
|
|
response => response.data,
|
|
err => Promise.reject(err),
|
|
);
|
|
|
|
export default api;
|