From 80cd745f38e96ff53adb763072356ba5fa754035 Mon Sep 17 00:00:00 2001 From: Cedric Sirianni Date: Wed, 11 Oct 2023 17:54:59 -0400 Subject: [PATCH] feat: create hello world application https://crowcpp.org/master/getting_started/your_first_application/ --- backend/src/main.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/backend/src/main.cpp b/backend/src/main.cpp index 474a71a..a927c23 100644 --- a/backend/src/main.cpp +++ b/backend/src/main.cpp @@ -5,5 +5,14 @@ #include "crow.h" int main(void) { - return EXIT_SUCCESS; + // delcare crow application + crow::SimpleApp app; + + // define endpoint at the root directory + CROW_ROUTE(app, "/")([](){ + return "Hello world"; + }); + + // set the port, set the app to run on multiple threads, and run the app + app.port(18080).multithreaded().run(); } \ No newline at end of file