Fix command line usage: data-dir and api-key are required.

This commit is contained in:
kishorenc 2019-09-07 23:43:19 +05:30
parent a3f883be2c
commit 6463663f81
2 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ if (APPLE)
set(STD_LIB -static-libstdc++) # https://stackoverflow.com/a/26543140/131050 (can't statically link libgcc on Mac)
FIND_PACKAGE(ngHTTP2 REQUIRED)
set(CURL_LIBRARIES ldap ${NGHTTP2_LIBRARIES} ${CURL_LIBRARIES}) # ldap and nghttp2 were not being statically built
set(CURL_LIBRARIES ${NGHTTP2_LIBRARIES} ${CURL_LIBRARIES}) # nghttp2 was not being statically built
else()
set(STD_LIB -static-libgcc -static-libstdc++)
endif()

View File

@ -18,8 +18,8 @@ bool directory_exists(const std::string & dir_path) {
void init_cmdline_options(cmdline::parser & options, int argc, char **argv) {
options.set_program_name("./typesense-server");
options.add<std::string>("data-dir", 'd', "Directory where data will be stored.", false);
options.add<std::string>("api-key", 'a', "API key that allows all operations.", false);
options.add<std::string>("data-dir", 'd', "Directory where data will be stored.", true);
options.add<std::string>("api-key", 'a', "API key that allows all operations.", true);
options.add<std::string>("search-only-api-key", 's', "API key that allows only searches.", false);
options.add<std::string>("listen-address", 'h', "Address to which Typesense server binds.", false, "0.0.0.0");