@@ -16,7 +16,35 @@ int port;
1616
1717// Handler to handle the `GET` request on `/hello/world`
1818void helloWorldHandler (Request &req, Response &res) {
19- res.status (StatusCode::OK ).send (" Hello World!" );
19+ json::object resp;
20+ resp[" framework" ] = " Expresso" ;
21+ resp[" repository" ] = " https://github.com/coding-cpp/expresso" ;
22+ resp[" language" ] = " C++" ;
23+ resp[" creator" ] = " Adit Jain" ;
24+
25+ json::object submodules;
26+ submodules.push_back (json::object ());
27+ submodules[0 ][" repository" ] = " https://github.com/coding-cpp/logger" ;
28+ submodules[0 ][" work" ] = " Logging library for C++" ;
29+ submodules[0 ][" location" ] = " lib/logger" ;
30+ submodules[0 ][" name" ] = " Logger" ;
31+
32+ json::object nexusSubmodule;
33+ nexusSubmodule[" repository" ] = " https://github.com/coding-cpp/nexus" ;
34+ nexusSubmodule[" work" ] = " Thread pool library for C++" ;
35+ submodules.push_back (nexusSubmodule);
36+ submodules[1 ][" location" ] = " lib/nexus" ;
37+ submodules[1 ][" name" ] = " Nexus" ;
38+
39+ submodules.push_back (json::object ());
40+ resp[" submodules" ] = submodules;
41+
42+ resp[" submodules" ][2 ][" repository" ] = " https://github.com/coding-cpp/json" ;
43+ resp[" submodules" ][2 ][" work" ] = " JSON library for C++" ;
44+ resp[" submodules" ][2 ][" location" ] = " lib/json" ;
45+ resp[" submodules" ][2 ][" name" ] = " JSON" ;
46+
47+ res.json (resp).status (200 );
2048 return ;
2149}
2250
@@ -26,7 +54,7 @@ int main(int argc, char **argv) {
2654 port = std::stoi (process.getEnv (" PORT" ));
2755
2856 // Running a server with max 10 connections and 4 threads
29- Server app (10 , 4 );
57+ Server app (10000 , 100 );
3058
3159 // Router, for routing requests starting with /hello
3260 Router world;
0 commit comments