move path to constructor

This commit is contained in:
liamcottle 2025-04-08 12:18:12 +12:00
parent 7ec82f8554
commit bc32340185
2 changed files with 9 additions and 10 deletions

View file

@ -1,7 +1,7 @@
import NodeJSSerialConnection from "../src/connection/nodejs_serial_connection.js";
// create tcp connection
const connection = new NodeJSSerialConnection();
const connection = new NodeJSSerialConnection("/dev/cu.usbmodem14401");
// wait until connected
connection.on("connected", async () => {
@ -24,4 +24,4 @@ connection.on("connected", async () => {
});
// connect to meshcore device
await connection.connect("/dev/cu.usbmodem14401");
await connection.connect();