Open tjesser-ucdavis-edu opened 5 years ago
I think the server urls are contained here: https://github.com/retrievertech/seismogram-app/blob/master/client/src/browse/ServerUrls.svc.js
Basically if you access the website at https://foo.com
, it'll connect to the server using https://foo.com:3000
. It dynamically grabs the foo.com
from the URL.
It would be nice to have a config file for this. Something like:
{
"database": { "url": "...", "username": "...", "password": "...", "dbname": "..." },
"skateServer": { "url": "...", "username": "...", "password": "..." }
}
Basically a central config that (a) services can use to instantiate/configure themselves, and (b) service A knows where to find service B.
From this you could auto-generate a server-url.js
with contents
export let serverUrl = "<the_url>";
that ServerUrls.svc.js can import and use. This could be null by default and ServerUrls.svc.js can default to using $location if that's the case.
Hi, I've been trying to get the seismogram-app working in a set of containers, and been having trouble finding all the places the client refers to the location of the server as localhost.
You can find my attempt here: https://github.com/tjesser-ucdavis-edu/docker-SKATE.
I'm using a Docker network to connect containers I created for the database, server, and client, and I've created patches to point the server to the database, but finding where the client refers to the server has been more difficult. Would you be able to point me to where in the code I can make that type of change?
For reference, the error(s) I get:
and I want to be able to tell the client to use the URL
http://seismo-server-inst:3000/query/stations
.