mirror of
https://github.com/weaveworks/scope.git
synced 2026-08-19 04:16:21 +00:00
UI for controls.
- Make backend address configurable via env variable - `BACKEND_HOST=1.2.3.4:4040 npm start` points the frontend to the app on that server. Just for development - Render control icons - removed close x for details panel - added control icons in its space - closing of panel still works by clicking on same node, or background - Dont allow control while pending - Render and auto-dismiss control error - Make tests pass
This commit is contained in:
committed by
Tom Wilkie
parent
8f957c4f13
commit
abcb94b1f1
+4
-2
@@ -28,9 +28,11 @@ app.get('/app.js', function(req, res) {
|
||||
|
||||
// Proxy to backend
|
||||
|
||||
var BACKEND_HOST = process.env.BACKEND_HOST || 'localhost:4040';
|
||||
|
||||
// HACK need express-http-proxy, because proxy-middleware does
|
||||
// not proxy to /api itself
|
||||
app.use(httpProxy('localhost:4040', {
|
||||
app.use(httpProxy(BACKEND_HOST, {
|
||||
filter: function(req) {
|
||||
return url.parse(req.url).path === '/api';
|
||||
},
|
||||
@@ -39,7 +41,7 @@ app.use(httpProxy('localhost:4040', {
|
||||
}
|
||||
}));
|
||||
|
||||
app.use('/api', proxy('http://localhost:4040/api/'));
|
||||
app.use('/api', proxy('http://' + BACKEND_HOST + '/api/'));
|
||||
|
||||
// Serve index page
|
||||
|
||||
|
||||
Reference in New Issue
Block a user