change bin file in package.json
This commit is contained in:
parent
fab43703cc
commit
1b3ca8a43b
1
cli.js
Normal file → Executable file
1
cli.js
Normal file → Executable file
@ -1,3 +1,4 @@
|
||||
#!/usr/bin/env node
|
||||
const WebSocket = require('ws');
|
||||
const chalk = require('chalk');
|
||||
const repl = require('repl');
|
||||
|
3
index.js
3
index.js
@ -42,10 +42,11 @@ const tconsole = (options = {}) => {
|
||||
options = {
|
||||
host: "localhost",
|
||||
port: 8080,
|
||||
ssl: false,
|
||||
...options,
|
||||
}
|
||||
|
||||
ws = new WebSocket(`ws://${options.host}:${options.port}`);
|
||||
ws = new WebSocket(`${options.ssl ? "wss" : "ws"}://${options.host}:${options.port}`);
|
||||
ws.onopen = () => {
|
||||
console.log('[TCONSOLE]: connected');
|
||||
configure(ws);
|
||||
|
@ -4,8 +4,7 @@
|
||||
"description": "Console log to terminal",
|
||||
"type": "main",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "node server.js"
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
x
Reference in New Issue
Block a user