mirror of
https://github.com/philipredstone/relnet.git
synced 2025-06-17 13:11:14 +02:00
auto discover url in frontend
This commit is contained in:
parent
845bfb856e
commit
524dc010d0
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
frontend/node_modules
|
||||||
|
frontend/dist
|
||||||
|
frontend/.env
|
||||||
|
frontend/bun.lockb
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
.env
|
||||||
|
bun.lockb
|
@ -1,6 +1,10 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const API_URL = process.env.REACT_APP_API_URL || 'http://localhost:5000/api';
|
const protocol = window.location.protocol;
|
||||||
|
const hostname = window.location.hostname;
|
||||||
|
const port = window.location.port;
|
||||||
|
|
||||||
|
const API_URL = protocol + '//' + hostname + (port ? ':' + port : '') + '/api';
|
||||||
|
|
||||||
// Configure axios
|
// Configure axios
|
||||||
axios.defaults.withCredentials = true;
|
axios.defaults.withCredentials = true;
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const API_URL = process.env.REACT_APP_API_URL || 'http://localhost:5000/api';
|
const protocol = window.location.protocol;
|
||||||
|
const hostname = window.location.hostname;
|
||||||
|
const port = window.location.port;
|
||||||
|
|
||||||
|
const API_URL = protocol + '//' + hostname + (port ? ':' + port : '') + '/api';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
export interface Network {
|
export interface Network {
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const API_URL = process.env.REACT_APP_API_URL || 'http://localhost:5000/api';
|
const protocol = window.location.protocol;
|
||||||
|
const hostname = window.location.hostname;
|
||||||
|
const port = window.location.port;
|
||||||
|
|
||||||
|
const API_URL = protocol + '//' + hostname + (port ? ':' + port : '') + '/api';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
export interface Person {
|
export interface Person {
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
|
|
||||||
const API_URL = process.env.REACT_APP_API_URL || 'http://localhost:5000/api';
|
const protocol = window.location.protocol;
|
||||||
|
const hostname = window.location.hostname;
|
||||||
|
const port = window.location.port;
|
||||||
|
|
||||||
|
const API_URL = protocol + '//' + hostname + (port ? ':' + port : '') + '/api';
|
||||||
|
|
||||||
// Types
|
// Types
|
||||||
export interface Relationship {
|
export interface Relationship {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user