change bin file in package.json

This commit is contained in:
Earther 2021-08-24 14:55:43 +07:00
parent fab43703cc
commit 1b3ca8a43b
3 changed files with 4 additions and 3 deletions

1
cli.js Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env node
const WebSocket = require('ws');
const chalk = require('chalk');
const repl = require('repl');

View File

@ -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);

View File

@ -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",