mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
✨ Serve editor-ui correctly also when installed as package
This commit is contained in:
parent
a3a11caa18
commit
6208125ac0
|
@ -1,4 +1,8 @@
|
|||
import * as express from 'express';
|
||||
import {
|
||||
dirname as pathDirname,
|
||||
join as pathJoin,
|
||||
} from 'path';
|
||||
import * as bodyParser from 'body-parser';
|
||||
import * as history from 'connect-history-api-fallback';
|
||||
import * as requestPromise from 'request-promise-native';
|
||||
|
@ -1092,7 +1096,8 @@ class App {
|
|||
|
||||
|
||||
// Serve the website
|
||||
this.app.use('/', express.static(__dirname + '/../../node_modules/n8n-editor-ui/dist', { index: 'index.html' }));
|
||||
const editorUiPath = require.resolve('n8n-editor-ui');
|
||||
this.app.use('/', express.static(pathJoin(pathDirname(editorUiPath), 'dist'), { index: 'index.html' }));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
0
packages/editor-ui/index.js
Normal file
0
packages/editor-ui/index.js
Normal file
|
@ -7,6 +7,7 @@
|
|||
"name": "Jan Oberhauser",
|
||||
"email": "jan@n8n.io"
|
||||
},
|
||||
"main": "index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/n8n-io/n8n.git"
|
||||
|
|
Loading…
Reference in a new issue