2018-05-10 09:11:22 +00:00
|
|
|
#include <drogon/DrObject.h>
|
2018-05-04 09:51:22 +00:00
|
|
|
#include <iostream>
|
2018-05-09 08:14:21 +00:00
|
|
|
#include <drogon/HttpAppFramework.h>
|
|
|
|
#include <trantor/utils/Logger.h>
|
2018-05-04 09:51:22 +00:00
|
|
|
static const char banner[]=" _ \n"
|
|
|
|
" __| |_ __ ___ __ _ ___ _ __ \n"
|
|
|
|
" / _` | '__/ _ \\ / _` |/ _ \\| '_ \\ \n"
|
|
|
|
"| (_| | | | (_) | (_| | (_) | | | |\n"
|
|
|
|
" \\__,_|_| \\___/ \\__, |\\___/|_| |_|\n"
|
|
|
|
" |___/ \n";
|
|
|
|
|
2018-05-10 09:11:22 +00:00
|
|
|
class HHH:public drogon::DrObject<HHH>
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HHH(){std::cout<<"class HHH constr,name="<<className()<<std::endl;}
|
|
|
|
};
|
|
|
|
|
2018-05-02 09:45:10 +00:00
|
|
|
int main()
|
|
|
|
{
|
2018-05-10 09:11:22 +00:00
|
|
|
drogon::DrObjectBase *p=drogon::DrClassMap::newObject("HHH");
|
2018-05-10 09:43:32 +00:00
|
|
|
|
2018-05-04 09:51:22 +00:00
|
|
|
std::cout<<banner<<std::endl;
|
2018-05-02 09:45:10 +00:00
|
|
|
drogon::HttpAppFramework framework("0.0.0.0",12345);
|
2018-05-03 10:28:37 +00:00
|
|
|
trantor::Logger::setLogLevel(trantor::Logger::TRACE);
|
2018-05-02 09:45:10 +00:00
|
|
|
framework.run();
|
2018-05-04 09:51:22 +00:00
|
|
|
}
|