tcp-ws-proxy/index.ts

14 lines
456 B
TypeScript
Raw Permalink Normal View History

import Client from "./src/Client";
import Server from "./src/Server";
2024-01-18 14:48:09 +00:00
if (process.argv[2] === "server") {
new Server();
2024-01-18 14:48:09 +00:00
} else if (process.argv[2] === "client") {
new Client();
} else {
if (process.argv[2] == null || process.argv[2].trim() == "") {
console.log(`You must pick an option. Valid options:\n - client\n - server`);
} else {
console.log(`${process.argv[2]} is not a valid option. Valid options:\n\t - client\n\t - server`);
2024-01-18 14:48:09 +00:00
}
}