Exemple #1
0
    static Startup()
    {
        CommandModel commandModel =
            new CommandModel("sc").AddArgument("port", new CommandArgument("type", "number"))
                                  .AddArgument("path", new CommandArgument("type", "string"))
                                  .AddArgument("logs", new CommandArgument("type", "boolean"));

        ApplicationOptions options;
        try {
            options = (ApplicationOptions)CommandLine.Parse(commandModel);
            options.Port = Script.Or(options.Port, Number.ParseInt(Node.Process.Environment["PORT"]), 1337);
            options.Path = Script.Or(options.Path, Node.Process.GetCurrentDirectory());

            Runtime.EnableTrace = options.Logs;
        }
        catch (Exception e) {
            Console.Log(e.Message);
            Console.Log(commandModel.ToString());

            return;
        }

        Application app = new Application(options);
        app.Run();
    }
Exemple #2
0
 public static object Parse(CommandModel commandModel)
 {
     return(null);
 }
Exemple #3
0
 public static object Parse(CommandModel commandModel)
 {
     return null;
 }