db-lab1/examples/hello.cpp

15 lines
261 B
C++
Raw Normal View History

2021-10-21 16:45:19 +08:00
#include <bserv/common.hpp>
#include <boost/json.hpp>
boost::json::object hello()
{
return {{"msg", "hello, world!"}};
}
int main()
{
bserv::server_config config;
// config.set_port(8080);
bserv::server{config, {
bserv::make_path("/hello", &hello)
}};
}