2020-08-15 14:15:16 +02:00
|
|
|
#include <drogon/drogon.h>
|
|
|
|
int main() {
|
|
|
|
//Set HTTP listener address and port
|
2020-08-15 14:50:31 +02:00
|
|
|
drogon::app().addListener("0.0.0.0", 8080);
|
2020-08-15 14:15:16 +02:00
|
|
|
//Load config file
|
2020-08-15 14:50:31 +02:00
|
|
|
drogon::app().loadConfigFile("config.json");
|
2020-08-15 14:15:16 +02:00
|
|
|
//Run HTTP framework,the method will block in the internal event loop
|
|
|
|
drogon::app().run();
|
2020-08-15 14:50:31 +02:00
|
|
|
|
2020-08-15 14:15:16 +02:00
|
|
|
return 0;
|
|
|
|
}
|