# HG changeset patch
# User drewp@bigasterisk.com
# Date 2023-06-08 20:20:23
# Node ID 06bf6dae8e64950a3fc9c1c379377081f9b7990a
# Parent 5e4321405f54aba4fb7f807d07eee140fc9ab971
reorg tools into light9/web/ and a single vite instance
diff --git a/bin/ascoltami b/bin/ascoltami
--- a/bin/ascoltami
+++ b/bin/ascoltami
@@ -1,4 +1,2 @@
#!/bin/zsh
-pnpm exec vite -c light9/ascoltami/vite.config.ts &
pdm run uvicorn light9.ascoltami.main:app --host 0.0.0.0 --port 8206 --no-access-log
-wait
diff --git a/bin/rdfdb b/bin/rdfdb
--- a/bin/rdfdb
+++ b/bin/rdfdb
@@ -1,4 +1,2 @@
#!/bin/zsh
-#pnpm exec vite -c light9/ascoltami/vite.config.ts &
-pdm run uvicorn --port 8209 light9.rdfdb.service:app --no-access-log
-wait
+exec pdm run uvicorn --port 8209 light9.rdfdb.service:app --no-access-log
diff --git a/light9/ascoltami/vite.config.ts b/light9/ascoltami/vite.config.ts
deleted file mode 100644
--- a/light9/ascoltami/vite.config.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { defineConfig } from "vite";
-
-const servicePort = 8206;
-export default defineConfig({
- base: "/ascoltami/",
- root: "./light9/ascoltami",
- publicDir: "../web",
- server: {
- host: "0.0.0.0",
- strictPort: true,
- port: servicePort + 100,
- hmr: {
- port: servicePort + 200,
- },
- },
- clearScreen: false,
- define: {
- global: {},
- },
-});
diff --git a/light9/collector/web/vite.config.ts b/light9/collector/web/vite.config.ts
deleted file mode 100644
--- a/light9/collector/web/vite.config.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { defineConfig } from "vite";
-
-const servicePort = 8202;
-export default defineConfig({
- base: "/collector/",
- root: "./light9/collector/web",
- publicDir: "../../web",
- server: {
- host: "0.0.0.0",
- strictPort: true,
- port: servicePort + 100,
- hmr: {
- port: servicePort + 200,
- },
- },
- clearScreen: false,
- define: {
- global: {},
- },
-});
diff --git a/light9/effect/listing/web/vite.config.ts b/light9/effect/listing/web/vite.config.ts
deleted file mode 100644
--- a/light9/effect/listing/web/vite.config.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { defineConfig } from "vite";
-
-const servicePort = 8218;
-export default defineConfig({
- base: "/effectListing/",
- root: "./light9/effect/listing/web",
- publicDir: "../../..",
- server: {
- host: "0.0.0.0",
- base: 'effectListing',
- strictPort: true,
- port: servicePort + 100,
- hmr: {
- port: servicePort + 200,
- },
- },
- clearScreen: false,
- define: {
- global: {},
- },
-});
diff --git a/light9/fade/vite.config.ts b/light9/fade/vite.config.ts
deleted file mode 100644
--- a/light9/fade/vite.config.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { defineConfig } from "vite";
-
-const servicePort = 8219;
-export default defineConfig({
- base: "/fade/",
- root: "./light9/fade/",
- publicDir: "../..",
-
- server: {
- host: "0.0.0.0",
- base: "/fade/",
- strictPort: true,
- port: servicePort + 100,
- hmr: {
- port: servicePort + 200,
- },
- },
- clearScreen: false,
- define: {
- global: {},
- },
-});
diff --git a/light9/homepage/write_config.py b/light9/homepage/write_config.py
--- a/light9/homepage/write_config.py
+++ b/light9/homepage/write_config.py
@@ -74,7 +74,7 @@ http {{
showPath = showconfig.showUri().split('/', 3)[-1]
root = showconfig.root()[:-len(showPath)].decode('ascii')
print(f'''
- location /show {{
+ location /show/ {{
root {root};
}}
diff --git a/light9/live/vite.config.ts b/light9/live/vite.config.ts
deleted file mode 100644
--- a/light9/live/vite.config.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { defineConfig } from "vite";
-
-const servicePort = 8217;
-export default defineConfig({
- base: "/live/",
- root: "./light9/live",
- publicDir: "../..",
- server: {
- host: "0.0.0.0",
- strictPort: true,
- port: servicePort + 100,
- hmr: {
- port: servicePort + 200,
- },
- },
- clearScreen: false,
- define: {
- global: {},
- },
-});
diff --git a/light9/web/RdfdbSyncedGraph.ts b/light9/web/RdfdbSyncedGraph.ts
--- a/light9/web/RdfdbSyncedGraph.ts
+++ b/light9/web/RdfdbSyncedGraph.ts
@@ -39,7 +39,7 @@ export class RdfdbSyncedGraph extends Li
["xsd", "http://www.w3.org/2001/XMLSchema#"],
]);
this.graph = new SyncedGraph(
- this.testGraph ? "unused" : "/rdfdb/api/syncedGraph",
+ this.testGraph ? "unused" : "/service/rdfdb/syncedGraph",
prefixes,
(s: string) => {
this.status = s;
diff --git a/light9/ascoltami/Light9AscoltamiUi.ts b/light9/web/ascoltami/Light9AscoltamiUi.ts
rename from light9/ascoltami/Light9AscoltamiUi.ts
rename to light9/web/ascoltami/Light9AscoltamiUi.ts
--- a/light9/ascoltami/Light9AscoltamiUi.ts
+++ b/light9/web/ascoltami/Light9AscoltamiUi.ts
@@ -4,16 +4,16 @@ import { customElement, property } from
import { classMap } from "lit/directives/class-map.js";
import { NamedNode } from "n3";
import Sylvester from "sylvester";
-import { Zoom } from "../web/light9-timeline-audio";
-import { PlainViewState } from "../web/Light9CursorCanvas";
-import { getTopGraph } from "../web/RdfdbSyncedGraph";
-import { SyncedGraph } from "../web/SyncedGraph";
+import { Zoom } from "../light9-timeline-audio";
+import { PlainViewState } from "../Light9CursorCanvas";
+import { getTopGraph } from "../RdfdbSyncedGraph";
+import { SyncedGraph } from "../SyncedGraph";
import { TimingUpdate } from "./main";
-import { showRoot } from "../web/show_specific";
-export { Light9TimelineAudio } from "../web/light9-timeline-audio";
-export { Light9CursorCanvas } from "../web/Light9CursorCanvas";
-export { RdfdbSyncedGraph } from "../web/RdfdbSyncedGraph";
-export { ResourceDisplay } from "../web/ResourceDisplay";
+import { showRoot } from "../show_specific";
+export { Light9TimelineAudio } from "../light9-timeline-audio";
+export { Light9CursorCanvas } from "../Light9CursorCanvas";
+export { RdfdbSyncedGraph } from "../RdfdbSyncedGraph";
+export { ResourceDisplay } from "../ResourceDisplay";
const $V = Sylvester.Vector.create;
debug.enable("*");
@@ -111,7 +111,7 @@ export class Light9AscoltamiUi extends L
render() {
return html`