This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
website/tools/api.ts

18 lines
369 B
TypeScript
Raw Normal View History

import axios from 'axios'
2023-09-18 22:21:59 +02:00
export const API_VERSION = '1.2.9'
export const API_DEFAULT_PORT = 8080
export const API_URL =
2023-01-11 17:39:09 +01:00
process.env['NEXT_PUBLIC_API_URL'] != null
? process.env['NEXT_PUBLIC_API_URL']
2022-12-13 11:38:07 +01:00
: `http://127.0.0.1:${API_DEFAULT_PORT}`
export const api = axios.create({
baseURL: API_URL,
headers: {
'Content-Type': 'application/json'
}
})