pare down some changes

This commit is contained in:
Felipe Gasper
2017-10-27 17:54:36 -05:00
parent 1586363b2e
commit 5c81fe6cdc
4 changed files with 25 additions and 224 deletions
+1 -8
View File
@@ -25,17 +25,10 @@ app.get('/js/*.js', function(req, res){
res.sendFile(__dirname + req.url);
});
const SHELL_ARGS = {
bash: ['--login'],
'cmd.exe': [],
};
var shell_name = process.platform === 'win32' ? 'cmd.exe' : 'bash';
app.post('/terminals', function (req, res) {
var cols = parseInt(req.query.cols),
rows = parseInt(req.query.rows),
term = pty.spawn(shell_name, SHELL_ARGS[shell_name], {
term = pty.spawn(process.platform === 'win32' ? 'cmd.exe' : 'bash', [], {
encoding: null,
name: 'xterm-color',
cols: cols || 80,