Vite SPA + Docker
If your app has no backend (pure Vite SPA), run mus-server as a pre-built Docker container. The image handles everything with no Node.js server to write.
Development
Section titled “Development”Add a Vite proxy so browser requests reach the local mus-server:
import { defineConfig } from 'vite'import react from '@vitejs/plugin-react'import { musVitePlugins } from '@datachef/mus/vite'
export default defineConfig({ plugins: [react(), ...musVitePlugins()], server: { proxy: { '/api/mus/': { target: 'http://localhost:3001', changeOrigin: true, }, }, },})SLACK_BOT_TOKEN=xoxb-your-bot-tokenThe musVitePlugins() helper starts a local development server that reads SLACK_BOT_TOKEN from the environment. You can also skip the plugin and just run mus-server manually with Docker.
Run mus-server locally:
docker run -d \ -p 3001:3001 \ -e SLACK_BOT_TOKEN=xoxb-your-token \ ghcr.io/datachefhq/mus-server:latestProduction
Section titled “Production”See Docker Compose for adding mus-server as a service, and nginx for proxying /api/mus/ to it.
Checking the health endpoint
Section titled “Checking the health endpoint”curl http://localhost:3001/healthz# → ok