23 lines
299 B
C++
23 lines
299 B
C++
|
|
#include <iostream>
|
|
#include <exception>
|
|
#include <stdexcept>
|
|
#include <Webserv.hpp>
|
|
|
|
int main(void)
|
|
{
|
|
try
|
|
{
|
|
Webserv serv;
|
|
|
|
serv.bind(80);
|
|
serv.listen(512); // 512 max connections arbitrary
|
|
serv.start();
|
|
}
|
|
catch (std::exception& e)
|
|
{
|
|
std::cout << e.what() << '\n';
|
|
}
|
|
return (0);
|
|
}
|