#include "../cpp-httplib/httplib.h"
#include "files.hpp"

#include <fstream>
#include <iostream>

std::string data_index = Files::load("../static/index.html");

httplib::Server svr;

int main()
{
	svr.set_mount_point("/static", "../static/public/");

	svr.Get("/", [](const httplib::Request& req, httplib::Response& res)
	{
		res.set_content(data_index, "text/html");
	});
	
	std::cout << "Listening on port 8080\n";
	svr.listen("0.0.0.0", 8080);
}