@ -15,72 +15,72 @@ var createStaticServer = require('./actions/createStaticServer');
varkillServer=require('./actions/killServer');
appendToList("example.com","80");
appendToList("example2.com","80","4000");
// appendToList("example.com", "80");
// appendToList("example2.com", "80", "4000");
// Check for requirements such as OS version and nginx install. Throw and exit if requirements not found. #Roadmap: Add ability to satisfy any possible requirements.
requirements();// Comment in development and uncomment this line in production. This should check whether the OS is compatible with this version of `up`
// program
// .version('0.1.5');
program
.version('0.1.5');
// program
// .command('static <domain> [outPort]')
// .description('Create a static server at this folder.')
// .action(function (domain, outPort) { //If outport is not given, 80 is set as default. Later, change this default to reflect nginx's settings.
// outPort = outPort || "80"; // This is a string because regex needs to validate it.
// if (!validate(domain, outPort)) return; //Validates domain and outport, and if invalid, throws and returns.
console.log("Done! Your static server has been set up!\nPoint your domain to this server and check "+chalk.cyan(domain)+" to verify!");
});
// program
// .command('proxy <domain> <inPort> [outPort]')
// .description('Create a proxy server, listening at port number.')
// .action(function (domain, inPort, outPort) { //Inbound port is necessary, but outbound is set to 80 by default. Again, will change this to reflect nginx's settings.
// outPort = outPort || "80"; // This is a string because regex needs to validate it.
// if (!validate(domain, inPort, outPort)) return;
// console.log("Done! Your reverse proxy server has been set up!\nPoint your domain to this server and check " + chalk.cyan(domain) + " to verify!");
// });
program
.command('proxy <domain> <inPort> [outPort]')
.description('Create a proxy server, listening at port number.')
.action(function(domain,inPort,outPort){ //Inbound port is necessary, but outbound is set to 80 by default. Again, will change this to reflect nginx's settings.
outPort=outPort||"80"; // This is a string because regex needs to validate it.