Browse Source

add new freamwork: cuehttp (#5731)

* add new freamwork: cuehttp

* modify port to 8080 & modify .travis.yml

* remove license
xcyl 5 years ago
parent
commit
c45be536e5

+ 1 - 0
.travis.yml

@@ -16,6 +16,7 @@ env:
     - "TESTLANG=CSharp"
     - 'TESTDIR="C++/cppcms C++/cpoll_cppsp C++/poco"'
     - "TESTDIR=C++/ffead-cpp"
+    - "TESTDIR=C++/cuehttp"
     - "TESTDIR=C++/cutelyst"
     - "TESTDIR=C++/libhttpserver"
     - "TESTDIR=C++/silicon"

+ 13 - 0
frameworks/C++/cuehttp/README.md

@@ -0,0 +1,13 @@
+# cuehttp Benchmarking Test
+
+https://github.com/xcyl/cuehttp
+
+## Testing Source Code
+
+* [PLAINTEXT](plaintext/main.cpp)
+
+## Test URLs
+
+### PLAINTEXT
+
+http://localhost:8080/plaintext

+ 25 - 0
frameworks/C++/cuehttp/benchmark_config.json

@@ -0,0 +1,25 @@
+{
+  "framework": "cuehttp",
+  "tests": [
+    {
+      "default": {
+        "plaintext_url": "/plaintext",
+        "port": 8080,
+        "approach": "Realistic",
+        "classification": "Fullstack",
+        "database": "None",
+        "framework": "cuehttp",
+        "language": "C++",
+        "flavor": "None",
+        "orm": "None",
+        "platform": "None",
+        "webserver": "None",
+        "os": "Linux",
+        "database_os": "Linux",
+        "display_name": "cuehttp",
+        "notes": "",
+        "versus": "cuehttp"
+      }
+    }
+  ]
+}

+ 17 - 0
frameworks/C++/cuehttp/cuehttp.dockerfile

@@ -0,0 +1,17 @@
+FROM ubuntu:18.04
+
+RUN apt-get update -yqq
+RUN apt-get install -yqq g++-7 cmake git uuid-dev libboost-all-dev
+
+ENV CUEHTTP=/cuehttp
+
+WORKDIR /
+RUN git clone https://github.com/xcyl/cuehttp.git
+
+WORKDIR /cuehttp
+RUN git checkout 69901e0e52be8f6ed69339d66ad0782a3917e241
+
+WORKDIR /cuehttp/examples/plaintext
+RUN mkdir build && cd build && cmake .. && make -j8
+EXPOSE 8080
+CMD ./build/plaintext

+ 21 - 0
frameworks/C++/cuehttp/plaintext/CMakeLists.txt

@@ -0,0 +1,21 @@
+cmake_minimum_required(VERSION 2.6)
+
+project(plaintext)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -msse4.2 -Wall -std=c++17")
+
+set(SRC main.cpp)
+include_directories($ENV{CUEHTTP}/include)
+
+find_package(Boost COMPONENTS system REQUIRED)
+include_directories(${Boost_INCLUDE_DIRS})
+
+add_executable(${PROJECT_NAME} ${SRC})
+
+target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
+
+if (WIN32)
+    target_link_libraries(${PROJECT_NAME} ws2_32 wsock32)
+else ()
+    target_link_libraries(${PROJECT_NAME} pthread)
+endif ()

+ 17 - 0
frameworks/C++/cuehttp/plaintext/main.cpp

@@ -0,0 +1,17 @@
+#include <cuehttp.hpp>
+
+using namespace cue::http;
+
+int main(int argc, char** argv) {
+    router route;
+    route.post("/plaintext", [](context& ctx) {
+        ctx.type("text/plain");
+        ctx.status(200);
+        ctx.body("Hello, World!");
+    });
+    cuehttp app;
+    app.use(route);
+    app.listen(8080).run();
+
+    return 0;
+}