라벨이 Drogon build인 게시물 표시

[4] Nginx Server Setup - Writing a Drogon Test API

이미지
Let's create an API using Drogon to return specific values as a test. --- ## 1. Setting up the Drogon Test Project - Run the following command in the directory where `drogon_ctl` is installed: ``` drogon_ctl create project testAPI cd testAPI ``` --- ## 2. Build - The full path will be /root/drogon2/drogon/build/drogon_ctl/testAPI/build ``` mkdir build cd build cmake .. make ``` --- If the following error occurs, it’s best to set the environment variable and reinstall Drogon: ``` CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package): By not providing "FindJsoncpp.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Jsoncpp", but CMake did not find one. Could not find a package configuration file provided by "Jsoncpp" with any of the following names: JsoncppConfig.cmake jsoncpp-config.cmake Add the installation ...

[4] Nginx 서버 셋업 - Drogon 테스트 API 작성

이미지
API를 만들어보자 Drogon 으로 만들거고, 관련 해서 특정 값을 리턴하는 정도로 진행한다 --- ## 1. Drogon Test Project 설정 - drogon_ctl 이 설치된 곳에서 아래 명령어를 입력한다 ``` drogon_ctl create project testAPI cd testAPI ``` --- ## 2. 빌드 - 전체 경로의 경우 /root/drogon2/drogon/build/drogon_ctl/testAPI/build 가 된다 ``` mkdir build cd build cmake .. make ``` --- 만약 아래 에러 발생 시 환경변수 선언하고 drogon 재설치하는게 마음편하니 재설치하자 ``` CMake Error at /usr/share/cmake/Modules/CMakeFindDependencyMacro.cmake:76 (find_package): By not providing "FindJsoncpp.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Jsoncpp", but CMake did not find one. Could not find a package configuration file provided by "Jsoncpp" with any of the following names: JsoncppConfig.cmake jsoncpp-config.cmake Add the installation prefix of "Jsoncpp" to CMAKE_PREFIX_PATH or set "Jsoncpp_DIR" to a directory containing one of the above files. If "Jsoncpp...

이 블로그의 인기 게시물

윤석열 계엄령 선포! 방산주 대폭발? 관련주 투자 전략 완벽 분석

대통령 퇴진운동 관련주: 방송·통신·촛불수혜주 완벽 분석

키움 OPEN API MFC 개발 (1)