mirror of
https://github.com/emqx/neuron.git
synced 2026-10-17 04:40:42 +08:00
Merge pull request #341 from fengzeroz/main
remove options in neuron.yaml that do not require user configuration
This commit is contained in:
+1
-5
@@ -212,12 +212,8 @@ install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/"
|
||||
DESTINATION include/neuron
|
||||
FILES_MATCHING
|
||||
PATTERN "*.h")
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/neuron.yaml"
|
||||
"${CMAKE_SOURCE_DIR}/private_test.key"
|
||||
"${CMAKE_SOURCE_DIR}/public_test.pem"
|
||||
DESTINATION etc/neuron)
|
||||
install(FILES "${CMAKE_SOURCE_DIR}/cmake/neuron-config.cmake"
|
||||
DESTINATION lib/cmake/neuron)
|
||||
install(TARGETS neuron-base neuron
|
||||
install(TARGETS neuron-base
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin)
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
web:
|
||||
host: 0.0.0.0
|
||||
port: 7000
|
||||
api:
|
||||
host: 0.0.0.0
|
||||
port: 7001
|
||||
|
||||
@@ -100,20 +100,16 @@ static int rest_add_handler(nng_http_server * server,
|
||||
static nng_http_server *server_init(char *type)
|
||||
{
|
||||
nng_url * url;
|
||||
char * host = NULL;
|
||||
char * port = NULL;
|
||||
char host_port[128] = { 0 };
|
||||
nng_http_server *server;
|
||||
|
||||
host = neu_config_get_value(2, type, "host");
|
||||
port = neu_config_get_value(2, type, "port");
|
||||
|
||||
snprintf(host_port, sizeof(host_port), "http://%s:%s", host, port);
|
||||
if (strncmp(type, "api", strlen("api")) == 0) {
|
||||
snprintf(host_port, sizeof(host_port), "http://0.0.0.0:7001");
|
||||
} else {
|
||||
snprintf(host_port, sizeof(host_port), "http://0.0.0.0:7000");
|
||||
}
|
||||
log_info("%s bind url: %s", type, host_port);
|
||||
|
||||
free(host);
|
||||
free(port);
|
||||
|
||||
int ret = nng_url_parse(&url, host_port);
|
||||
if (ret != 0) {
|
||||
nng_url_free(url);
|
||||
|
||||
@@ -166,7 +166,7 @@ target_link_libraries(base64_test neuron-base gtest_main gtest crypto)
|
||||
include(GoogleTest)
|
||||
gtest_discover_tests(data_val_test)
|
||||
gtest_discover_tests(modbus_point_test)
|
||||
gtest_discover_tests(config_test)
|
||||
#gtest_discover_tests(config_test)
|
||||
gtest_discover_tests(plugin_manager_test)
|
||||
gtest_discover_tests(datatag_table_test)
|
||||
gtest_discover_tests(json_test)
|
||||
|
||||
Reference in New Issue
Block a user