Пример #1
0
    ippapp(unsigned short port) : application(port)
    {
        set_default_template("template");

        mvcpp::database::current_database = new mvcpp::sqlite("data.db"); // start database

        // Register all controllers
        register_controller<home_controller>();
        register_controller<customer_controller>();
        register_controller<sales_invoice_controller>();

        // Register all models
        customer::create_tables(true);
        sales_invoice::create_tables(true);
    }
Пример #2
0
 test_application() : application(8080){
     register_controller<test_controller>();
     set_default_template("template");
 }