Rainy.RainyStandaloneServer.Start C# (CSharp) Method

Start() public method

public Start ( ) : void
return void
        public void Start()
        {
            appHost.Init ();

            logger.DebugFormat ("starting http listener at: {0}", ListenUrl);
            appHost.Start (ListenUrl);
        }

Usage Example

Example #1
0
        public void Start(string use_backend = "sqlite")
        {
            tmpPath = "/tmp/rainy-test-data/";
            Directory.CreateDirectory(tmpPath);
            DbConfig.SetSqliteFile(Path.Combine(tmpPath, "rainy-test.db"));
            // tmpPath = Path.GetTempPath () + Path.GetRandomFileName ();

            IDataBackend backend;

            if (use_backend == "sqlite")
            {
                backend = new DatabaseBackend(tmpPath, credentialsVerifier);
                DbConfig.CreateSchema(reset: true);
                using (var c = DbConfig.GetConnection()) {
                    c.Insert <DBUser>(new DBUser()
                    {
                        Username = TEST_USER
                    });
                }
            }
            else
            {
                backend = new RainyFileSystemBackend(tmpPath, credentialsVerifier);
            }

            rainyServer = new RainyStandaloneServer(backend, RainyListenUrl);

            rainyServer.Start();
        }
All Usage Examples Of Rainy.RainyStandaloneServer::Start