forked from NAB-khaoula/webserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
32 lines (30 loc) · 1.3 KB
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: mbelaman <mbelaman@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2022/01/08 16:32:15 by ybouddou #+# #+# */
/* Updated: 2022/02/22 19:35:43 by mbelaman ### ########.fr */
/* */
/* ************************************************************************** */
#include "WebServ.hpp"
int main(int ac, char **av)
{
try
{
if (ac != 2)
throw std::runtime_error("\033[1;31mSyntax Error: \033[0m\033[1;37mSpecify Output The Program and File Configuration like: './webserv [configuration file]'.\033[0m");
ws webserv;
begin_parser(webserv, av);
multipleServers(webserv);
}
catch(const std::exception& err)
{
std::cout << err.what();
std::cout << std::endl;
return (0);
}
return (0);
}