mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-18 09:13:26 +03:00
14 lines
322 B
TypeScript
14 lines
322 B
TypeScript
import axios from 'axios';
|
|
|
|
abstract class APIService {
|
|
protected api = axios.create({ baseURL: '/api' });
|
|
|
|
constructor() {
|
|
if (typeof process !== 'undefined' && process?.env?.DEVELOPMENT_BACKEND_URL) {
|
|
this.api.defaults.baseURL = process.env.DEVELOPMENT_BACKEND_URL;
|
|
}
|
|
}
|
|
}
|
|
|
|
export default APIService;
|