1 - Install the dependencies with npm install
2 - Start a development server with npm run dev
3 - Check the app in http://localhost:3000
By default in development mode the app will run a fake api server using miragejs package, but you can change this and use a proxy to a real you-space instance.
To use the proxy you only need to define theses variables
API_PROXY_URL=http://localhost:3333 # url for api
VITE_USE_PROXY=true # tell the app to use a proxy url
1 - Make sure to build the static files with npm run build
2 - And in you-space instance import and connect the dashboard to a route
import Route from "@ioc:Adonis/Core/Route";
import { createDashboard } from "@you-space/dashboard";
// create a spa with base-path = ys-admin
const dashboard = createDashboard("ys-admin");
Route.get("ys-admin", dashboard.render);
Route.get("ys-admin/*", dashboard.render);
This will render the spa in /ys-admin
route