14 lines
343 B
TypeScript
14 lines
343 B
TypeScript
import { Configuration } from "@/swagger";
|
|
|
|
// is this production or dev?
|
|
function is_dev(): boolean {
|
|
return process.env.NODE_ENV === "development";
|
|
}
|
|
|
|
export function conf(): Configuration {
|
|
return new Configuration({
|
|
// what url to send requests to
|
|
basePath: is_dev() ? "http://127.0.0.1:7056" : window.location.origin,
|
|
});
|
|
}
|