Skip to content
Snippets Groups Projects
Commit d47ae04c authored by Brian Peiris's avatar Brian Peiris
Browse files

Merge remote-tracking branch 'origin/feature/dev-environment' into...

Merge remote-tracking branch 'origin/feature/dev-environment' into feature/ux-changes-3-with-remount-refactor
parents 23ea3686 ce3c1c86
No related branches found
No related tags found
No related merge requests found
......@@ -329,8 +329,9 @@ const onReady = async () => {
console.log(`Hub ID: ${hubId}`);
const socketProtocol = document.location.protocol === "https:" ? "wss:" : "ws:";
const socketPort = qs.phx_port || document.location.port;
const socketHost = qs.phx_host || document.location.hostname;
const socketPort = qs.phx_port || (process.env.NODE_ENV === "production" ? document.location.port : 443);
const socketHost =
qs.phx_host || (process.env.NODE_ENV === "production" ? document.location.hostname : "dev.reticulum.io");
const socketUrl = `${socketProtocol}//${socketHost}${socketPort ? `:${socketPort}` : ""}/socket`;
console.log(`Phoenix Channel URL: ${socketUrl}`);
......
......@@ -19,9 +19,9 @@ const messages = localeData[lang] || localeData.en;
const ENVIRONMENT_URLS = [
"https://asset-bundles-prod.reticulum.io/rooms/meetingroom/MeetingRoom.bundle.json",
"https://asset-bundles-prod.reticulum.io/rooms/theater/TheaterMeshes.bundle.json",
"https://asset-bundles-prod.reticulum.io/rooms/atrium/AtriumMeshes.bundle.json",
"https://asset-bundles-prod.reticulum.io/rooms/courtyard/CourtyardMeshes.bundle.json"
"https://asset-bundles-prod.reticulum.io/rooms/theater/Theater.bundle.json",
"https://asset-bundles-prod.reticulum.io/rooms/atrium/Atrium.bundle.json",
"https://asset-bundles-prod.reticulum.io/rooms/courtyard/Courtyard.bundle.json"
];
class HomeRoot extends Component {
......
......@@ -38,14 +38,25 @@ class HubCreatePanel extends Component {
hub: { name: this.state.name, default_environment_gltf_bundle_url: environment.bundle_url }
};
const res = await fetch("/api/v1/hubs", {
let createUrl = "/api/v1/hubs";
if (process.env.NODE_ENV === "development") {
createUrl = `https://dev.reticulum.io${createUrl}`;
}
const res = await fetch(createUrl, {
body: JSON.stringify(payload),
headers: { "content-type": "application/json" },
method: "POST"
});
const hub = await res.json();
document.location = hub.url;
if (process.env.NODE_ENV === "production") {
document.location = hub.url;
} else {
document.location = `/hub.html?hub_id=${hub.hub_id}`;
}
};
isHubNameValid = () => {
......
......@@ -2,6 +2,6 @@ import Raven from "raven-js";
export default function registerTelemetry() {
if (process.env.NODE_ENV === "production") {
Raven.config("https://f571beaf5cee4e3085e0bf436f3eb158@sentry.io/256771").install();
Raven.config("https://013d6a364fed43cdb0539a61d520597a@sentry.prod.mozaws.net/370").install();
}
}
......@@ -87,7 +87,7 @@ const config = {
mode: "development",
devtool: process.env.NODE_ENV === "production" ? "source-map" : "inline-source-map",
devServer: {
open: true,
open: false,
https: createHTTPSConfig(),
host: "0.0.0.0",
useLocalIp: true,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment