Browse Source

Merge pull request #15 from rabchev/master

hterm update
pull/31/head
Krishna Srinivas 10 years ago
parent
commit
54c65b14a3
  1. 16
      .gitignore
  2. 37
      Gruntfile.js
  3. 20
      README.md
  4. 13
      bin/wetty.conf
  5. 3
      bin/wetty.js
  6. 23
      package.json
  7. 1
      public/index.html
  8. 10483
      public/wetty/hterm.js
  9. 11526
      public/wetty/hterm_all.js
  10. 1
      public/wetty/index.html

16
.gitignore

@ -0,0 +1,16 @@
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
tmp
pids
logs
results
npm-debug.log
node_modules/*

37
Gruntfile.js

@ -0,0 +1,37 @@
module.exports = function (grunt) {
require('load-grunt-tasks')(grunt);
var config = {
mkdir: {
tmp: {
options: {
create: ['tmp']
}
}
},
gitclone: {
hterm: {
options: {
cwd: './tmp',
repository: 'https://chromium.googlesource.com/apps/libapps'
}
}
},
shell: {
build_hterm: {
command: 'LIBDOT_SEARCH_PATH=$(pwd) ./libdot/bin/concat.sh -i ./hterm/concat/hterm_all.concat -o ../../public/wetty/hterm_all.js',
options: {
execOptions: {
cwd: './tmp/libapps'
}
}
}
},
clean: ['./tmp']
};
grunt.initConfig(config);
grunt.registerTask('update-hterm', ['mkdir:tmp', 'gitclone:hterm', 'shell:build_hterm', 'clean']);
};

20
README.md

@ -80,11 +80,6 @@ Else if you are running `app.js` as a regular user you have to use:
**Note that if your Nginx is configured for HTTPS you should run wetty without SSL.**
Issues
------
Does not work on Firefox as hterm was written for ChromeOS. So works well on Chrome.
Dockerized Version
------------------
@ -99,3 +94,18 @@ docker run --name term -p 3000 -dt nathanleclaire/wetty
Visit the appropriate URL in your browser (`[localhost|$(boot2docker ip)]:PORT`).
The username is `term` and the password is `term`.
Run wetty as a service daemon
-----------------------------
Install wetty globally with -g option:
```bash
$ sudo npm install wetty -g
$ sudo cp /usr/local/lib/node_modules/wetty/bin/wetty.conf /etc/init
$ sudo start wetty
```
This will start wetty on port 3000. If you want to change the port or redirect stdout/stderr you should change the last line in `wetty.conf` file, something like this:
exec sudo -u root wetty -p 80 >> /var/log/wetty.log 2>&1

13
bin/wetty.conf

@ -0,0 +1,13 @@
# Upstart script
# /etc/init/wetty.conf
description "Web TTY"
author "Wetty"
start on started mountall
stop on shutdown
respawn
respawn limit 20 5
exec sudo -u root wetty -p 3000

3
bin/wetty.js

@ -0,0 +1,3 @@
#!/usr/bin/env node
require("../app");

23
package.json

@ -1,16 +1,23 @@
{
"name": "wetty",
"version": "0.0.8",
"version": "0.0.9",
"dependencies": {
"express": "3.5.1",
"websocket": "",
"websocket": "^1.0",
"pty.js": "git+https://github.com/terryschen/pty.js",
"optimist": "",
"waitpid": ""
"optimist": "^0.6",
"waitpid": "^0.1"
},
"devDependencies": {
"load-grunt-tasks": "^3.0",
"grunt": "^0.4",
"grunt-shell": "^1.1",
"grunt-mkdir": "^0.1",
"grunt-git": "^0.3",
"grunt-contrib-clean": "^0.6"
},
"description": "Wetty = Web + tty. Terminal access in browser over http/https ",
"main": "app.js",
"devDependencies": {},
"repository": {
"type": "git",
"url": "git://github.com/krishnasrinivas/wetty.git"
@ -20,5 +27,9 @@
"bugs": {
"url": "https://github.com/krishnasrinivas/wetty/issues"
},
"homepage": "https://github.com/krishnasrinivas/wetty"
"homepage": "https://github.com/krishnasrinivas/wetty",
"preferGlobal": "true",
"bin": {
"wetty": "./bin/wetty.js"
}
}

1
public/index.html

@ -5,7 +5,6 @@
<meta charset="UTF-8">
<title>Wetty - The WebTTY Terminal Emulator</title>
<script src="/wetty/hterm_all.js"></script>
<script src="/wetty/hterm.js"></script>
<script src="/wetty/wetty.js"></script>
<style>
html,

10483
public/wetty/hterm.js

File diff suppressed because it is too large

11526
public/wetty/hterm_all.js

File diff suppressed because it is too large

1
public/wetty/index.html

@ -5,7 +5,6 @@
<meta charset="UTF-8">
<title>Wetty - The WebTTY Terminal Emulator</title>
<script src="/wetty/hterm_all.js"></script>
<script src="/wetty/hterm.js"></script>
<script src="/wetty/wetty.js"></script>
<style>
html,

Loading…
Cancel
Save