mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 03:16:11 +01:00
refactor(nx/client): set up proxy to client
This commit is contained in:
@@ -19,9 +19,10 @@ const persistentCacheStatic = (root: string, options?: serveStatic.ServeStaticOp
|
||||
async function register(app: express.Application) {
|
||||
const srcRoot = path.join(path.dirname(fileURLToPath(import.meta.url)), "..");
|
||||
if (isDev) {
|
||||
const clientProxy = proxy(process.env.TRILIUM_PUBLIC_SERVER);
|
||||
app.use(`/${assetPath}/app/doc_notes`, persistentCacheStatic(path.join(srcRoot, "public/app/doc_notes")));
|
||||
app.use(`/${assetPath}/app`, proxy("localhost:4200"));
|
||||
app.use(`/${assetPath}/app-dist`, proxy("localhost:4200"));
|
||||
app.use(`/${assetPath}/app`, clientProxy);
|
||||
app.use(`/${assetPath}/app-dist`, clientProxy);
|
||||
app.use(`/${assetPath}/stylesheets`, persistentCacheStatic(path.join(srcRoot, "../../client/stylesheets")));
|
||||
app.use(`/${assetPath}/libraries`, persistentCacheStatic(path.join(srcRoot, "../../client/libraries")));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user