+ Quibot Motor Control
+
+
+
+
+
+
+
+
+ {{ message }}
+
+
+
+ {{ error }}
+
+
+
+
+
+
+
diff --git a/quibot-web/nuxt.config.ts b/quibot-web/nuxt.config.ts
index b26ebd9..e3376af 100644
--- a/quibot-web/nuxt.config.ts
+++ b/quibot-web/nuxt.config.ts
@@ -2,6 +2,10 @@
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
+ runtimeConfig: {
+ quibotBaseUrl: process.env.QUIBOT_BASE_URL || 'http://quibot:8000',
+ quibotToken: process.env.QUIBOT_TOKEN || 'MY_SECRET_TOKEN',
+ },
vite: {
optimizeDeps: {
include: [
diff --git a/quibot-web/server/api/motor/step.post.ts b/quibot-web/server/api/motor/step.post.ts
new file mode 100644
index 0000000..2dca8e5
--- /dev/null
+++ b/quibot-web/server/api/motor/step.post.ts
@@ -0,0 +1,10 @@
+export default defineEventHandler(async () => {
+ const config = useRuntimeConfig()
+
+ return await $fetch(`${config.quibotBaseUrl}/motor/step`, {
+ method: 'POST',
+ query: {
+ token: config.quibotToken,
+ },
+ })
+})
diff --git a/quibot-web/server/api/motor/stop.post.ts b/quibot-web/server/api/motor/stop.post.ts
new file mode 100644
index 0000000..6e787b4
--- /dev/null
+++ b/quibot-web/server/api/motor/stop.post.ts
@@ -0,0 +1,10 @@
+export default defineEventHandler(async () => {
+ const config = useRuntimeConfig()
+
+ return await $fetch(`${config.quibotBaseUrl}/motor/stop`, {
+ method: 'POST',
+ query: {
+ token: config.quibotToken,
+ },
+ })
+})