Ernst is something like getty but for Node.js.
It spends its time in the following loop:
- Open a serial port
- Display a welcome banner
- If the user requests connection, sublaunch some process
- Forward text from that process to and from the port
- Clean up and loop back to step 2
This allows you to set up some kind of terminal, whether physical or virtual, and offer a process over it.
- Create a
config.json
file (as below) npm i
node index.js
create config.json
{
"portPath": "/dev/tty.whatever",
"saltCmd": "/usr/bin/ssh",
"saltArgs": [
"…"
],
"baudRate": 19200
}
Copyright (c) 2023-2024 Code Hive Tx, LLC
SPDX-License-Identifier: Apache-2.0
Licensed under Apache-2.0