allow localhost across vpn

This commit is contained in:
Anish Lakhwara 2024-10-26 00:06:55 -07:00
parent 47bde257e4
commit 417a16cc74
3 changed files with 7725 additions and 2 deletions

7718
mast-react/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,7 @@
"express": "^4.18.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"uuid4": "^2.0.3",
"vite-express": "^0.9.2"
},
"devDependencies": {
@ -34,4 +35,4 @@
"vite": "^4.3.9",
"vite-plugin-pwa": "^0.16.4"
}
}
}

View file

@ -2,6 +2,9 @@ import App from "./App.tsx";
import schemaContent from "./schemas/main2.sql?raw";
import { DBProvider } from "@vlcn.io/react";
import { useEffect, useState } from "react";
import { v4 as uuidv4 } from 'uuid';
/**
* Generates a random room name to sync with or pulls one from local storage.
@ -74,5 +77,6 @@ function writeHash(hash: HashBag) {
}
function newRoom() {
return crypto.randomUUID().replaceAll("-", "");
let uuid = uuidv4();
return uuid.replaceAll("-", "");
}