MCPcopy Index your code
hub / github.com/atomicdata-dev/atomic-data-browser / setServerUrl

Method setServerUrl

lib/src/store.ts:293–301  ·  view source on GitHub ↗

Sets the Server base URL, without the trailing slash.

(url: string)

Source from the content-addressed store, hash-verified

291
292 /** Sets the Server base URL, without the trailing slash. */
293 setServerUrl(url: string): void {
294 tryValidURL(url);
295 if (url.substr(-1) == '/') {
296 throw Error('baseUrl should not have a trailing slash');
297 }
298 this.serverUrl = url;
299 // TODO This is not the right place
300 this.setWebSocket();
301 }
302
303 // TODO: don't do this, have one websocket per domain
304 /** Closes an old websocket and opens a new one to the BaseURL */

Callers 3

constructorMethod · 0.95
useBaseURLFunction · 0.80
App.tsxFile · 0.80

Calls 2

setWebSocketMethod · 0.95
tryValidURLFunction · 0.90

Tested by

no test coverage detected