Skip to content

Commit

Permalink
Updated configuration options help, other minor improvements.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmihajlovski committed May 12, 2016
1 parent f7d866d commit 2fecb8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
Expand Up @@ -33,10 +33,10 @@ public class ConfigHelp extends RapidoidThing {
public static void processHelp(Object[] args) { public static void processHelp(Object[] args) {
if (args != null && args.length == 1 && args[0].equals("--help")) { if (args != null && args.length == 1 && args[0].equals("--help")) {
show("Usage:"); show("Usage:");
show(" java -cp <yourapp>.jar com.yourapp.Main [option1 option2 ...]"); show(" java -cp <yourapp>.jar com.example.Main [option1 option2 ...]");


show("\nExample:"); show("\nExample:");
show(" java -cp <yourapp>.jar com.yourapp.Main app.port=9090 app.address=127.0.0.1 production secret=my-secret"); show(" java -cp <yourapp>.jar com.example.Main on.port=9090 on.address=127.0.0.1 production secret=my-secret");


show("\nAvailable options:"); show("\nAvailable options:");


Expand Down
Expand Up @@ -38,15 +38,12 @@ private static List<ConfigOption> configOptions() {


opts.add(opt("dev", "configure DEV mode", "auto-detected")); opts.add(opt("dev", "configure DEV mode", "auto-detected"));
opts.add(opt("production", "configure PRODUCTION mode", "auto-detected")); opts.add(opt("production", "configure PRODUCTION mode", "auto-detected"));
opts.add(opt("secret=<SECRET>", "configure app-specific secret token for encryption", "(random)")); opts.add(opt("secret=<SECRET>", "configure app-specific secret for encryption", "(random)"));


opts.add(opt("app.port=<P>", "the default (App) server will listen at port P", 8888)); opts.add(opt("on.port=<P>", "the default (App) server will listen at port P", 8888));
opts.add(opt("app.address=<ADDR>", "the default (App) server will listen at address ADDR", "0.0.0.0")); opts.add(opt("on.address=<ADDR>", "the default (App) server will listen at address ADDR", "0.0.0.0"));


opts.add(opt("dev.port=<P>", "the Dev server will listen at port P", 7777)); opts.add(opt("admin.port=<P>", "the Admin server will listen at port P", "same as on.port"));
opts.add(opt("dev.address=<ADDR>", "the Dev server will listen at address ADDR", "127.0.0.1"));

opts.add(opt("admin.port=<P>", "the Admin server will listen at port P", 9999));
opts.add(opt("admin.address=<ADDR>", "the Admin server will listen at address ADDR", "0.0.0.0")); opts.add(opt("admin.address=<ADDR>", "the Admin server will listen at address ADDR", "0.0.0.0"));


// opts.add(opt("stateless", "Run in stateless mode, session becomes cookiepack", false)); // opts.add(opt("stateless", "Run in stateless mode, session becomes cookiepack", false));
Expand Down
Expand Up @@ -4,7 +4,7 @@
import org.rapidoid.annotation.Authors; import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since; import org.rapidoid.annotation.Since;
import org.rapidoid.setup.App; import org.rapidoid.setup.App;
import org.rapidoid.util.Msc; import org.rapidoid.setup.AppBootstrap;


/* /*
* #%L * #%L
Expand Down Expand Up @@ -33,10 +33,8 @@ public class Rapidoid extends RapidoidThing {
private Rapidoid() { private Rapidoid() {
} }


public static synchronized void run(String... args) { public static synchronized AppBootstrap run(String... args) {
App.bootstrap(args).full(); return App.bootstrap(args);

Msc.logSection("Rapidoid bootstrap completed");
} }


} }

0 comments on commit 2fecb8b

Please sign in to comment.