#include "create_project.h" #include #include #include #include #include using namespace drogon_ctl; void create_project::handleCommand(std::vector ¶meters) { if(parameters.size()<1) { std::cout<<"please input project name"<\n" "int main() {\n" " //设置http监听的地址和端口\n" " drogon::HttpAppFramework::instance().addListener(\"0.0.0.0\",80);\n" " //运行http框架,程序阻塞在底层的事件循环中\n" " drogon::HttpAppFramework::instance().run();\n" " return 0;\n" "}"; } static void newGitIgFile(std::ofstream &gitFile) { gitFile<<"# Prerequisites\n" "*.d\n" "\n" "# Compiled Object files\n" "*.slo\n" "*.lo\n" "*.o\n" "*.obj\n" "\n" "# Precompiled Headers\n" "*.gch\n" "*.pch\n" "\n" "# Compiled Dynamic libraries\n" "*.so\n" "*.dylib\n" "*.dll\n" "\n" "# Fortran module files\n" "*.mod\n" "*.smod\n" "\n" "# Compiled Static libraries\n" "*.lai\n" "*.la\n" "*.a\n" "*.lib\n" "\n" "# Executables\n" "*.exe\n" "*.out\n" "*.app\n" "\n" "build\n" "cmake-build-debug\n" ".idea\n"; } void create_project::createProject(const std::string &projectName) { std::cout<<"create a project named "<