14 lines
No EOL
456 B
TypeScript
14 lines
No EOL
456 B
TypeScript
import Client from "./src/Client";
|
|
import Server from "./src/Server";
|
|
|
|
if (process.argv[2] === "server") {
|
|
new Server();
|
|
} 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`);
|
|
}
|
|
} |