674da96a59
This connects Xterm.js to a Nomad exec websocket so people can interact on clients via live sessions. There are buttons on job, allocation, task group, and task detail pages that open a popup that lets them edit their shell command and start a session. More is to come, as recorded in issues.
15 lines
455 B
JavaScript
15 lines
455 B
JavaScript
'use strict';
|
|
|
|
module.exports = function(app, options) {
|
|
const globSync = require('glob').sync;
|
|
const mocks = globSync('./mocks/**/*.js', { cwd: __dirname }).map(require);
|
|
const proxies = globSync('./proxies/**/*.js', { cwd: __dirname }).map(require);
|
|
|
|
// Log proxy requests
|
|
const morgan = require('morgan');
|
|
app.use(morgan('dev'));
|
|
|
|
mocks.forEach(route => route(app, options));
|
|
proxies.forEach(route => route(app, options));
|
|
};
|