0.2.1 • Published 1 year ago

@you-space/dashboard v0.2.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

You-space dashboard

you-space

Vue app used to manage a you-space instance

npm - you-space - twitter

Getting started

1 - Install the dependencies with npm install

2 - Start a development server with npm run dev

3 - Check the app in http://localhost:3000

Proxy mode

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

You-space link

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