-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cc
33 lines (27 loc) · 962 Bytes
/
main.cc
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
#include <drogon/drogon.h>
#include <iostream>
#include <locale.h>
using namespace std;
using namespace drogon;
int main() {
setlocale(LC_ALL, "Turkish");
const char *homeDir = getenv("HOME");
std::string uploadDir = homeDir + string("/product-images");
cout << "Drogon 0.0.0.0:8189 'da çalışıyor..." << endl;
//Set HTTP listener address and port
// drogon::app()
// .setUploadPath(string(uploadDir)).setClientMaxBodySize(8*1024*1024).setClientMaxMemoryBodySize(1024*1024)
// .enableSession()
// .setThreadNum(4)
// // .enableRunAsDaemon()
// .setFileTypes({"json", "png"})
// .addListener("0.0.0.0", 8189)
// .run();
//Load config file
drogon::app()
.loadConfigFile("../config.json")
.run();
//drogon::app().loadConfigFile("../config.yaml");
//Run HTTP framework,the method will block in the internal event loop
return EXIT_SUCCESS;
}