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. 22
      README.md
  4. 13
      bin/wetty.conf
  5. 3
      bin/wetty.js
  6. 55
      package.json
  7. 1
      public/index.html
  8. 10483
      public/wetty/hterm.js
  9. 11530
      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']);
};

22
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.** **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 Dockerized Version
------------------ ------------------
@ -94,8 +89,23 @@ whatever you want!
Just do: Just do:
``` ```
docker run --name term -p 3000 -dt nathanleclaire/wetty docker run --name term -p 3000 -dt nathanleclaire/wetty
``` ```
Visit the appropriate URL in your browser (`[localhost|$(boot2docker ip)]:PORT`). Visit the appropriate URL in your browser (`[localhost|$(boot2docker ip)]:PORT`).
The username is `term` and the password is `term`. 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");

55
package.json

@ -1,24 +1,35 @@
{ {
"name": "wetty", "name": "wetty",
"version": "0.0.8", "version": "0.0.9",
"dependencies": { "dependencies": {
"express": "3.5.1", "express": "3.5.1",
"websocket": "", "websocket": "^1.0",
"pty.js": "git+https://github.com/terryschen/pty.js", "pty.js": "git+https://github.com/terryschen/pty.js",
"optimist": "", "optimist": "^0.6",
"waitpid": "" "waitpid": "^0.1"
}, },
"description": "Wetty = Web + tty. Terminal access in browser over http/https ", "devDependencies": {
"main": "app.js", "load-grunt-tasks": "^3.0",
"devDependencies": {}, "grunt": "^0.4",
"repository": { "grunt-shell": "^1.1",
"type": "git", "grunt-mkdir": "^0.1",
"url": "git://github.com/krishnasrinivas/wetty.git" "grunt-git": "^0.3",
}, "grunt-contrib-clean": "^0.6"
"author": "Krishna Srinivas <krishna.srinivas@gmail.com> (https://github.com/krishnasrinivas)", },
"license": "MIT", "description": "Wetty = Web + tty. Terminal access in browser over http/https ",
"bugs": { "main": "app.js",
"url": "https://github.com/krishnasrinivas/wetty/issues" "repository": {
}, "type": "git",
"homepage": "https://github.com/krishnasrinivas/wetty" "url": "git://github.com/krishnasrinivas/wetty.git"
},
"author": "Krishna Srinivas <krishna.srinivas@gmail.com> (https://github.com/krishnasrinivas)",
"license": "MIT",
"bugs": {
"url": "https://github.com/krishnasrinivas/wetty/issues"
},
"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"> <meta charset="UTF-8">
<title>Wetty - The WebTTY Terminal Emulator</title> <title>Wetty - The WebTTY Terminal Emulator</title>
<script src="/wetty/hterm_all.js"></script> <script src="/wetty/hterm_all.js"></script>
<script src="/wetty/hterm.js"></script>
<script src="/wetty/wetty.js"></script> <script src="/wetty/wetty.js"></script>
<style> <style>
html, html,

10483
public/wetty/hterm.js

File diff suppressed because it is too large

11530
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"> <meta charset="UTF-8">
<title>Wetty - The WebTTY Terminal Emulator</title> <title>Wetty - The WebTTY Terminal Emulator</title>
<script src="/wetty/hterm_all.js"></script> <script src="/wetty/hterm_all.js"></script>
<script src="/wetty/hterm.js"></script>
<script src="/wetty/wetty.js"></script> <script src="/wetty/wetty.js"></script>
<style> <style>
html, html,

Loading…
Cancel
Save