1.1.2 • Published 7 months ago

quick-terminal v1.1.2

Weekly downloads
-
License
ISC
Repository
-
Last release
7 months ago

quick-terminal

Use

Run the server from the shell

quick-terminal --port 3000

Set up the client

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .terminal
            {
                border: 2px solid #23314f;
                display: block;
                height: 600px;
                width: 600px;
            }
        </style>
        <link href="./dist/style.css" rel="stylesheet">
    </head>
    <body>
        <div id="terminal" class="terminal">
        
        </div>
        <script type="module">
            import {initTerminal} from "./dist/index.js";
            initTerminal({port: 3000, terminalID: "terminal", wsUrl: "localhost"})
        </script>
    </body>
</html>

Options

Run a server from code

const {startWebSocketServer} = require("quick-terminal");
startWebSocketServer();