2024-01-19 10:20:23 +00:00
|
|
|
import Client from "./src/Client";
|
|
|
|
import Server from "./src/Server";
|
2024-01-18 14:48:09 +00:00
|
|
|
|
|
|
|
if (process.argv[2] === "server") {
|
2024-01-19 10:20:23 +00:00
|
|
|
new Server();
|
2024-01-18 14:48:09 +00:00
|
|
|
} else if (process.argv[2] === "client") {
|
2024-01-19 10:20:23 +00:00
|
|
|
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
|
|
|
}
|
|
|
|
}
|