src: use the plumbed BLACKSMITH_BACKEND_URL if present
This commit is contained in:
parent
e836937c09
commit
4759d93c12
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -10,9 +10,11 @@ import { Metric, Metric_MetricType } from "@buf/blacksmith_vm-agent.bufbuild_es/
|
|||
|
||||
// Configure base axios instance for Blacksmith API.
|
||||
const createBlacksmithAPIClient = () => {
|
||||
const apiUrl = process.env.BLACKSMITH_ENV?.includes('staging')
|
||||
const apiUrl = process.env.BLACKSMITH_BACKEND_URL || (
|
||||
process.env.BLACKSMITH_ENV?.includes('staging')
|
||||
? 'https://stagingapi.blacksmith.sh'
|
||||
: 'https://api.blacksmith.sh';
|
||||
: 'https://api.blacksmith.sh'
|
||||
);
|
||||
|
||||
const client = axios.create({
|
||||
baseURL: apiUrl,
|
||||
|
|
Loading…
Reference in New Issue