2015-09-19 01:49:23 +08:00
|
|
|
#ifndef MEMGRAPH_SPEEDY_INL
|
|
|
|
#define MEMGRAPH_SPEEDY_INL
|
|
|
|
|
|
|
|
#include "speedy.hpp"
|
|
|
|
|
|
|
|
namespace speedy
|
|
|
|
{
|
|
|
|
|
2015-09-20 20:30:26 +08:00
|
|
|
Speedy::Speedy(uv::UvLoop& loop, const http::Ipv4& ip) : server(loop), ip(ip)
|
2015-09-19 01:49:23 +08:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Speedy::get(const std::string path, http::request_cb_t callback)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Speedy::listen()
|
|
|
|
{
|
|
|
|
server.listen(ip, [](http::Request& req, http::Response& res) {
|
|
|
|
res.send(req.url);
|
|
|
|
});
|
|
|
|
|
|
|
|
std::cout << "Server is UP" << std::endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
Speedy::~Speedy()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|