mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-07-27 22:07:48 +00:00
Co-authored-by: 谨欣 <echo.cmy@antgroup.com> Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
15 lines
248 B
TypeScript
15 lines
248 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;
|