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` - + @@ -193,26 +193,26 @@ export class Light9AscoltamiUi extends L if (!this.selectedSong) { return; } - await fetch("api/song", { method: "POST", body: this.selectedSong.value }); + await fetch("../service/ascoltami/song", { method: "POST", body: this.selectedSong.value }); } onCmdStop(ev?: MouseEvent): void { - postJson("api/time", { pause: true }); + postJson("../service/ascoltami/time", { pause: true }); } onCmdPlay(ev?: MouseEvent): void { - postJson("api/time", { resume: true }); + postJson("../service/ascoltami/time", { resume: true }); } onCmdIntro(ev?: MouseEvent): void { - postJson("api/time", { t: this.times.intro, resume: true }); + postJson("../service/ascoltami/time", { t: this.times.intro, resume: true }); } onCmdPost(ev?: MouseEvent): void { - postJson("api/time", { + postJson("../service/ascoltami/time", { t: this.currentDuration - this.times.post, resume: true, }); } onCmdGo(ev?: MouseEvent): void { - postJson("api/go", {}); + postJson("../service/ascoltami/go", {}); } bindKeys() { @@ -244,7 +244,7 @@ export class Light9AscoltamiUi extends L async musicSetup() { // shoveled over from the vanillajs version - const config = await (await fetch("api/config")).json(); + const config = await (await fetch("../service/ascoltami/config")).json(); this.show = new NamedNode(config.show); this.times = config.times; document.title = document.title.replace("{{host}}", config.host); diff --git a/light9/ascoltami/index.html b/light9/web/ascoltami/index.html rename from light9/ascoltami/index.html rename to light9/web/ascoltami/index.html --- a/light9/ascoltami/index.html +++ b/light9/web/ascoltami/index.html @@ -2,7 +2,7 @@ ascoltami on {{host}} - +