Add support for host and port within address

This commit is contained in:
2023-07-11 18:57:49 +07:00
parent 87339a97d5
commit 775c5da038
6 changed files with 74 additions and 14 deletions

View File

@@ -2,18 +2,18 @@ import { startClient } from '../src/api';
async function main() {
const client = await startClient({
port: 3000,
// port: 8081,
address: '172.17.0.2:8222',
options: {
profile: 'mytest',
},
});
console.log('Client started:', client?.getEndpoint());
setTimeout(async () => {
client?.stop();
}, 5000);
}, 10000);
}
main().catch((err) => {