Skip to content

Commit

Permalink
Add height and width variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lechien73 committed Aug 17, 2021
1 parent 8b1c879 commit f5c74ae
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions controllers/default.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Pty = require('node-pty');
const fs = require('fs');

var width = process.env.WIDTH != null ? process.env.WIDTH : 80;
var height = process.env.HEIGHT != null ? process.env.HEIGHT : 24;
const WIDTH = process.env.WIDTH != null ? process.env.WIDTH : 80;
const HEIGHT = process.env.HEIGHT != null ? process.env.HEIGHT : 24;

exports.install = function () {

Expand All @@ -26,8 +26,8 @@ function socket() {
// Each client will have own terminal
client.tty = Pty.spawn('python3', ['run.py'], {
name: 'xterm-color',
cols: 80,
rows: 24,
cols: WIDTH,
rows: HEIGHT,
cwd: process.env.PWD,
env: process.env
});
Expand Down

0 comments on commit f5c74ae

Please sign in to comment.