use 'appserver' instead of 'docserver' with backwards compatible

This commit is contained in:
Jonathan Shook 2020-09-15 17:51:06 -05:00
parent 60f7f551ff
commit 003ba6c362
2 changed files with 9 additions and 10 deletions

View File

@ -12,7 +12,6 @@ import java.nio.file.StandardOpenOption;
import java.util.Arrays; import java.util.Arrays;
public class DocServerApp { public class DocServerApp {
public final static String APPNAME_DOCSERVER = "docserver";
private static final Logger logger = LogManager.getLogger(DocServerApp.class); private static final Logger logger = LogManager.getLogger(DocServerApp.class);
// static { // static {
@ -129,14 +128,14 @@ public class DocServerApp {
private static void showHelp(String... helpArgs) { private static void showHelp(String... helpArgs) {
System.out.println( System.out.println(
"Usage: " + APPNAME_DOCSERVER + " " + "Usage: appserver " +
" [url] " + " [url] " +
" [path]... " + "\n" + " [path]... " + "\n" +
"\n" + "\n" +
"If [url] is provided, then the scheme, address and port are all taken from it.\n" + "If [url] is provided, then the scheme, address and port are all taken from it.\n" +
"Any additional paths are served from the filesystem, in addition to the internal ones.\n" + "Any additional paths are served from the filesystem, in addition to the internal ones.\n" +
"\n" + "\n" +
"For now, only http:// is supported." "For now, only http:// is supported."
); );
} }

View File

@ -97,7 +97,7 @@ public class NBCLI {
VirtDataMainApp.main(Arrays.copyOfRange(args, 1, args.length)); VirtDataMainApp.main(Arrays.copyOfRange(args, 1, args.length));
System.exit(0); System.exit(0);
} }
if (args.length > 0 && args[0].toLowerCase().equals("docserver")) { if (args.length > 0 && args[0].toLowerCase().matches("docserver|appserver")) {
DocServerApp.main(Arrays.copyOfRange(args, 1, args.length)); DocServerApp.main(Arrays.copyOfRange(args, 1, args.length));
System.exit(0); System.exit(0);
} }