Make server start and stop (start on a default or given port)

This commit is contained in:
Michael Bykovski
2017-07-08 12:15:41 +02:00
parent 203bd54167
commit 1459752b0d
6 changed files with 108 additions and 14 deletions
+28 -2
View File
@@ -19,8 +19,21 @@ exports.defineAutoTests = function() {
};
exports.defineManualTests = function(contentEl, createActionButton) {
createActionButton('Start Webserver', function() {
console.log(webserver);
createActionButton('Start bljad Webserver', function() {
console.log("Starting webserver...");
webserver.start(
function() {
console.log('Success!');
},
function() {
console.log('Error!');
}
);
});
createActionButton('Start Webserver with Port 1337', function() {
console.log("Starting webserver...");
webserver.start(
function() {
@@ -29,7 +42,20 @@ exports.defineManualTests = function(contentEl, createActionButton) {
function() {
console.log('Error!');
},
1337
);
});
createActionButton('Stop Webserver', function() {
console.log("Stopping webserver...");
webserver.stop(
function() {
console.log('Success!');
},
function() {
console.log('Error!');
}
);
});
};