mirror of
https://gitee.com/fasiondog/hikyuu.git
synced 2024-12-03 04:17:58 +08:00
28 lines
509 B
C++
28 lines
509 B
C++
/*
|
|
* Copyright(C) 2021 hikyuu.org
|
|
*
|
|
* Create on: 2021-02-26
|
|
* Author: fasiondog
|
|
*/
|
|
|
|
#include <hikyuu/hikyuu.h>
|
|
#include "http/HttpServer.h"
|
|
#include "rest_api/hello.h"
|
|
#include "rest_api/login.h"
|
|
|
|
using namespace hku;
|
|
|
|
int main(int argc, char* argv[]) {
|
|
init_server_logger();
|
|
|
|
LOG_INFO("start server ... You can press Ctrl-C stop");
|
|
|
|
HttpServer server("http://*", 520);
|
|
|
|
server.GET<HelloHandle>("/hello");
|
|
server.GET<LoginHandle>("/login");
|
|
|
|
server.start();
|
|
return 0;
|
|
}
|