Skip to content

Commit

Permalink
Merge pull request #18 from Point72/tkp/relative
Browse files Browse the repository at this point in the history
use relative paths for JS code
  • Loading branch information
gauglertodd authored Jun 13, 2024
2 parents 2467efa + 8232466 commit cc71303
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ window.addEventListener("load", async () => {
const workspace = document.querySelector("perspective-workspace");
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
const websocket = perspective.websocket(
`${protocol}//${window.location.host}/ws`,
`${protocol}//${window.location.host}${window.location.pathname}/ws`,
);
const registeredTables = new Set();
const worker = perspective.worker();

const updateTables = async () => {
const response = await fetch("/tables");
const response = await fetch(`${window.location.href}/tables`);
const tables = await response.json();

tables.map(async (tableName) => {
Expand Down

0 comments on commit cc71303

Please sign in to comment.