mirror of
https://github.com/yawaflua/SpCloudCore.git
synced 2025-12-09 20:19:35 +02:00
Adjust dotnet publish and change port of app
This commit is contained in:
@@ -69,7 +69,12 @@ public:
|
||||
private:
|
||||
void dotnet_publish(const std::string& path)
|
||||
{
|
||||
std::string dll_file_name = file_processing->find_file_by_suffix(path, "dll");
|
||||
std::string dll_file_name = file_processing->find_file_by_suffix(path, "exe");
|
||||
|
||||
size_t pos = dll_file_name.find(".exe");
|
||||
if (pos != std::string::npos) {
|
||||
dll_file_name.replace(pos, 4, ".dll");
|
||||
}
|
||||
|
||||
std::string command = R"(dotnet )" + path + "/" + dll_file_name;
|
||||
|
||||
|
||||
@@ -39,14 +39,16 @@ int main()
|
||||
|
||||
PublishController publish_controller(svr, authorization_service, file_processing, logger);
|
||||
|
||||
std::cout << "Server is running at http://localhost:8080" << '\n';
|
||||
std::cout << "Server is running at http://localhost:8081" << '\n';
|
||||
|
||||
svr.Post("/publish", [&](const httplib::Request& req, httplib::Response& res)
|
||||
{
|
||||
logger.log(INFO, "Start publish from main");
|
||||
|
||||
publish_controller.process_publish(req, res);
|
||||
|
||||
res.set_content("App is running on address ????", "text/plain");//Todo add app address showing
|
||||
});
|
||||
|
||||
svr.listen("0.0.0.0", 8080);
|
||||
svr.listen("0.0.0.0", 8081);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user