-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
35 lines (28 loc) · 929 Bytes
/
main.cpp
File metadata and controls
35 lines (28 loc) · 929 Bytes
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
33
34
35
#include <iostream>
#include <vector>
#include <boost/program_options.hpp>
#include "configurable.h"
#include "filewebserver.h"
#include "filesystemmodel.h"
#include "commandlinereader.h"
#include "configurationreader.h"
#include "htmlcontentgenerator.h"
int main(int ac, char ** av)
{
CommandLineReader reader(ac,av);
Configuration config = reader.configuration();
FileSystemModel fileSystemModel;
fileSystemModel.setConfiguration(config);
std::cout << fileSystemModel.rootDir() << std::endl;
HTMLContentGenerator htmlGenerator;
htmlGenerator.setConfiguration(config);
htmlGenerator.setModel(&fileSystemModel);
//std::cout<<htmlGenerator.generate("/");
FileWebServer server;
server.setConfiguration(config);
server.setFileSysemModel(&fileSystemModel);
server.setGenerator(&htmlGenerator);
server.run();
std::cout << "Hello World!" << std::endl;
return 0;
}