-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserver.coffee
57 lines (51 loc) · 1007 Bytes
/
server.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/usr/bin/env coffee
process.title = 'terminal-cool'
tty = require 'tty.js'
url = require 'url'
shell = process.argv[2] || "/bin/bash"
shellArgs = process.argv[3...]
console.log "shell command is #{shell} with parameters #{shellArgs}"
config =
port: 8080
hostname: "0.0.0.0"
shell: shell
shellArgs: shellArgs
static: "./static"
limitGlobal: 100
limitPerUser: 10
localOnly: false
cwd: "/tmp"
syncSession: false
sessionTimeout: 600000
log: true
io:
log: true
debug: true
term:
termName: "xterm" # xterm-256color ?
geometry: [80, 24]
scrollback: 1000
visualBell: true
popOnBell: false
cursorBlink: true
screenKeys: false
colors: [
"#2e3436"
"#cc0000"
"#4e9a06"
"#c4a000"
"#3465a4"
"#75507b"
"#06989a"
"#d3d7cf"
"#555753"
"#ef2929"
"#8ae234"
"#fce94f"
"#729fcf"
"#ad7fa8"
"#34e2e2"
"#eeeeec"
]
app = tty.createServer config
app.listen()