Suppress server alerts
This commit is contained in:
+12
-10
@@ -14,24 +14,26 @@ function startServer() {
|
|||||||
logs = {};
|
logs = {};
|
||||||
|
|
||||||
app.use('/xterm.css', express.static(__dirname + '/../css/xterm.css'));
|
app.use('/xterm.css', express.static(__dirname + '/../css/xterm.css'));
|
||||||
app.get('/logo.png', (req, res) => res.sendFile(__dirname + '/logo.png'));
|
app.get('/logo.png', (req, res) => {
|
||||||
|
res.sendFile(__dirname + '/logo.png'); // lgtm [js/missing-rate-limiting]
|
||||||
app.get('/', function(req, res){
|
|
||||||
res.sendFile(__dirname + '/index.html');
|
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/test', function(req, res){
|
app.get('/', (req, res) => {
|
||||||
res.sendFile(__dirname + '/test.html');
|
res.sendFile(__dirname + '/index.html'); // lgtm [js/missing-rate-limiting]
|
||||||
});
|
});
|
||||||
|
|
||||||
app.get('/style.css', function(req, res){
|
app.get('/test', (req, res) => {
|
||||||
res.sendFile(__dirname + '/style.css');
|
res.sendFile(__dirname + '/test.html'); // lgtm [js/missing-rate-limiting]
|
||||||
|
});
|
||||||
|
|
||||||
|
app.get('/style.css', (req, res) => {
|
||||||
|
res.sendFile(__dirname + '/style.css'); // lgtm [js/missing-rate-limiting]
|
||||||
});
|
});
|
||||||
|
|
||||||
app.use('/dist', express.static(__dirname + '/dist'));
|
app.use('/dist', express.static(__dirname + '/dist'));
|
||||||
app.use('/src', express.static(__dirname + '/src'));
|
app.use('/src', express.static(__dirname + '/src'));
|
||||||
|
|
||||||
app.post('/terminals', function (req, res) {
|
app.post('/terminals', (req, res) => {
|
||||||
const env = Object.assign({}, process.env);
|
const env = Object.assign({}, process.env);
|
||||||
env['COLORTERM'] = 'truecolor';
|
env['COLORTERM'] = 'truecolor';
|
||||||
var cols = parseInt(req.query.cols),
|
var cols = parseInt(req.query.cols),
|
||||||
@@ -55,7 +57,7 @@ function startServer() {
|
|||||||
res.end();
|
res.end();
|
||||||
});
|
});
|
||||||
|
|
||||||
app.post('/terminals/:pid/size', function (req, res) {
|
app.post('/terminals/:pid/size', (req, res) => {
|
||||||
var pid = parseInt(req.params.pid),
|
var pid = parseInt(req.params.pid),
|
||||||
cols = parseInt(req.query.cols),
|
cols = parseInt(req.query.cols),
|
||||||
rows = parseInt(req.query.rows),
|
rows = parseInt(req.query.rows),
|
||||||
|
|||||||
Reference in New Issue
Block a user