Fast and easy C++ RESTful WebServices framework

Overview

ngrest

Build Status

ngrest is a simple C++ REST framework. It has small footprint, fast and very easy in use.

ngrest allow you to deploy C++ RESTful webservices under Apache2, Nginx or under simple ngrest http server.

ngrest is written on C++11 and uses CMake for build.

Documentation and how-to's are available from Wiki.

Quick tour

Hello world

No coding needed to make Hello world service working!

ngrest create HelloWorld
cd helloworld
ngrest

That's all! Now you can browse service operations and try HelloWorld service using ngrest service tester: http://localhost:9098/ngrest/service/HelloWorld.

Upon creation the test echo resource added to every service and by the address http://localhost:9098/helloworld/echo?text=YOUR_TEXT this service will respond:

{"result": "Hi, YOUR_TEXT"}

Handling simple data types:

ngrest supports simple C++ data types:

class Calculator: public ngrest::Service {
public:
    int add(int a, int b) {
        return a + b;
    }

    int sub(int a, int b) {
        return a - b;
    }
};

To the request http://localhost:9098/Calculator/add?a=2&b=3 this service will respond:

{"result":5}

Handling complex data types

ngrest supports complex C++ data types such as structures, enums, typedefs and STL containers:

struct Pet {
    enum class Species {
        canine,
        feline
    };

    Species species;
    std::string name;
    std::string birthday;
};

class Pets: public ngrest::Service {
public:
    std::list<Pet> getPets() {
        return std::list<Pet>({{
            Pet::Species::canine,
            "spot",
            "Jan 1, 2010"
        },{
            Pet::Species::feline,
            "puff",
            "July 4, 2014"
        }});
    }
};

To the request http://localhost:9098/Pets/getPets this service will respond:

{"result":[{"species":"canine","name":"spot","birthday":"Jan 1, 2010"},{"species":"feline","name":"puff","birthday":"July 4, 2014"}]}

Setting up HTTP method and location

To set HTTP method and location special comments are used:

// *location: /notes
class Notes: public ngrest::Service {
public:
    //! adds a new note
    // *method: POST
    // *location: /new
    std::string add(const std::string& text);

    //! gets all notes
    // *location: /all
    std::map<std::string, std::string> getAll();

    //! get a note by id
    // *location: /{id}
    std::string get(const std::string& id);

    //! deletes a note by id
    // *method: DELETE
    // *location: /{id}
    std::string remove(const std::string& id);
};

Please note, default method is GET and default location is equals to the name.

This will create a REST service on root path /notes. Also this will add four resources:

Operation Method URL Request Response
add POST http://localhost:9098/notes/new {"text":"Example text of the note"} {"result":"d90638e1"}
getAll GET http://localhost:9098/notes/all {"result":[{"d90638e1":"Example text of the note"}]}
get GET http://localhost:9098/notes/d90638e1 {"result":"Example text of the note"}
remove DELETE http://localhost:9098/notes/d90638e1

Install

Supported OS are: Linux, Windows and Mac OS X. If you need support for another OS, please create new issue.

Under Linux installation process is simple. To install ngrest, just open terminal and copy-paste:

wget -qO- http://bit.ly/ngrest | bash

Installation guide with screenshots for Linux

Installation guide with screenshots for Windows

Installation guide with screenshots for Mac OS X

Notes:

  1. If you don't have one of dependencies required, installer will ask you to enter your password to install it automatically. If you don't want this, press Ctrl+C and start this command: "sudo apt-get install git cmake g++". After apt-get finished, start the line above again.

  2. By default script installs ngrest wrapper into best location available. If you have ~/bin directory in your search path ngrest wrapper will be installed into it. Else it will try to install into /usr/local/bin/ and you will be prompted for your password to install. To override this behavior and forcibly install ngrest wrapper into ~/bin please create ~/bin directory and re-login. After re-login it should be added into $PATH automatically. If this does not happen, please add into your ~/.bashrc or ~/.profile a line: export PATH=$PATH:$USER/bin. Also you can export USERINST environment variable to something non-empty, install ngrest and re-login.

Create a new project

How to create and start project with screenshots

To create a new project please open new terminal and enter:

ngrest create <project_name>

Or if you prefer to do not split the service to interface (.h) and implementation (.cpp) and develop the whole service within single .hpp file, add -d hpp option and ngrest will create hpp-style service(s) for you:

ngrest create -d hpp <project_name>

Where <project_name> is a name of your project and a service name.

Example 1. Create project 'calculator' and a service 'Calculator':

ngrest create Calculator

Optionally you can set up additional services and define it's namespaces.

Example 2. Create project 'calc' and two services - 'org.example.Calculator' and 'org.example.DivService':

ngrest create calc org.example.Calculator org.example.DivService

Start the project

When a project is generated, an echo operation is added into each service. It's only provided as fast example and can be safely removed when you write your own operations.

You can start your project right after it's created:

cd calc
ngrest

ngrest wrapper will build your project and will start the server on default port.

After server is started you can try your service operations: open a link located below the To test your services try ngrest service tester: message in your browser, click "echo" link, enter something into "text" field and press "Submit".

Implementing the service

Service's sources are located in <servicename>/src/<ServiceName>.h/cpp/hpp files. To implement your service you must edit those files (QtCreator is a very good tool for that: open CMakeLists.txt from project's dir in QtCreator).

While you change source code, you can leave project started. ngrest will detect any changes in source code and will try to build and to apply changes. In case of successful build ngrest will restart the server.

If you faced with crash ngrest will try to trace the error using gdb and display the place of crash and program stack. To restart the server just modify your source code.

Example. Add "add" operation into Calculator service:

  1. if you use hpp-style service insert these lines into Calculator.hpp before end of class:
int add(int a, int b)
{
    return a + b;
}

to make your service class appear like this:

class Calculator: public ngrest::Service
{
public:
    // ...
    std::string echo(const std::string& text)
    {
        return "Hi, " + text;
    }

    int add(int a, int b)
    {
        return a + b;
    }
};
  1. If you use h/cpp-style service, insert this line into Calculator.h before end of class:
int add(int a, int b);

to make your service class appear like this:

class Calculator: public ngrest::Service
{
public:
    // ...
    std::string echo(const std::string& text);

    int add(int a, int b);
};

and add implementation - append these lines into Calculator.cpp:

int Calculator::add(int a, int b)
{
    return a + b;
}

After that, click on the service name in service tester to see and test new add operation.

Upgrade ngrest

To upgrade ngrest to the latest changeset from master branch type:

ngrest upgrade

If you want to downgrade to specific commit, add commit hash as last argument, for example:

ngrest upgrade 3b78eee

If there are any running projects it will be automatically rebuild and restarted.

Packages

Here is a list of packages to extend ngrest functinality:

Package Repo URL Description
loentar/ngrest-db https://github.com/loentar/ngrest-db Simple access to relational databases.

TODO

  • support complex types in services tester
  • support of sessions/cookies
  • WADL support?

Support

Feel free to ask ngrest related questions here on the Google groups.

There also a chat on: gitter.im/ngrest

Issues
  • This OS is not supported yet

    This OS is not supported yet

    Followed instructions for Windows installation and getting this error when executing the bash script: This OS is not support yet.

    Running uname -s gives me MSYS_NT-6.1 but the scripts wants MINGW. I'm not sure if it's because I installed MinGW the wrong way or if my OS (Windows 7 64bits) is really unsupported.

    Here's the full log:

    --2016-09-20 14:38:15--  http://bit.ly/ngrest
    Resolving bit.ly (bit.ly)... 67.199.248.10, 67.199.248.11
    Connecting to bit.ly (bit.ly)|67.199.248.10|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: https://raw.githubusercontent.com/loentar/ngrest/master/scripts/inst [
    following]
    --2016-09-20 14:38:16--  https://raw.githubusercontent.com/loentar/ngrest/master
    /scripts/inst
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.20.13
    3
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.20.1
    33|:443... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 3554 (3.5K) [text/plain]
    Saving to: 'STDOUT'
    
    -                   100%[=====================>]   3.47K  --.-KB/s   in 0.008s
    
    2016-09-20 14:38:16 (431 KB/s) - written to stdout [3554/3554]
    
    This OS is not yet supported
    
    opened by Allov 25
  • Supporting raw json string in HTTP requests

    Supporting raw json string in HTTP requests

    Hi,

    Thank you for supporting the HTTP PATCH. It is very helpful. I have another request. Would it be possible for the NGREST HTTP methods to pass on the raw json it received, and let the application parse it. I find that you currently provide the parsed output. That is splendid. My request is in addition to what you provide, a seperate set of handlers, through which the application can access the raw Json. I have existing code that I would like to invoke from the ngrest handler. That way ngrest handler would just get a std::string with the json payload, and from the handler I would call the appropriate (pre-existing) function to parse and use it.

    Regards Raajesh

    opened by raadiy 13
  • Build issues on Windows 10

    Build issues on Windows 10

    When I try to call ngrest or ngrest build to start a service on Windows 10, I notice a couple quirks in the build process. First, the ngrest bash script (invoked from ngrest.cmd on Windows) does not seem to override my default CMake generator (Visual Studio project files) as it is supposed to. This appears to be due to the following code in the script's build() function definition:

    if [ $OS = MSYS ]
    then
      CMAKE_FLAGS+=" '-GUnix Makefiles' -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc"
    fi
    
    cmake $CMAKE_FLAGS $PROJECT_DIR >cmake.log || return $?
    

    The generator argument gets ignored for some reason, and CMake proceeds as if it were generating a Visual Studio project. If I slightly modify the code as follows, then it generates the expected Unix Makefiles:

    if [ $OS = MSYS ]
    then
      CMAKE_GENERATOR="Unix Makefiles"
      cmake -G"$CMAKE_GENERATOR" -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc $PROJECT_DIR >cmake.log || return $?
    else
      cmake -DCMAKE_BUILD_TYPE=DEBUG $PROJECT_DIR >cmake.log || return $?
    fi
    

    I think the issue had something to do with the space in the generator name. A similar change might be advisable in the definition for build_package():

    if [ $OS = MSYS ]
    then
      CMAKE_GENERATOR="Unix Makefiles"
      cmake -G"$CMAKE_GENERATOR" ${CMAKE_FLAGS:-} "$2" >cmake-build.log
    else
      cmake ${CMAKE_FLAGS:-} "$2" >cmake-build.log
    fi
    #[ $OS != MSYS ] || CMAKE_FLAGS="'-GUnix Makefiles' ${CMAKE_FLAGS:-}"
    #cmake "${CMAKE_FLAGS:-}" "$2" >cmake-build.log
    

    The other quirk I noticed was that when I try to run ngrest(.cmd) from a standard command prompt, I run into the following error when the script is running the make command on the generated Makefile:

    Cannot create temporary file in C:\WINDOWS\: Permission denied
    

    I'm not sure if this is something that I could easily change through some setting, but by default, make seems to try putting temporary files in the WINDOWS directory by default. I can get around this if I run the ngrest command from a command prompt as an administrator, but I was curious if there was any simpler way to deal with this problem. If not, then it might be useful to add a remark about this to the "Create a new project" section of the readme.

    opened by jjmccollum 11
  • May u be able to extend the rest api to cover ajax as well

    May u be able to extend the rest api to cover ajax as well

    Hi ngrest gatekeeper

    When you are programming using the web interface, rest and ajax are supported.

    Is there a possibility to extend the current ngrest to support ajax as well.

    What does it take to extend the current ngrest to support ajax? Any pointer is much appreciate?

    Thanks and Regards.

    question 
    opened by iot-cloud 8
  • Supporting Multiple HTTP Get Handler functions in the service

    Supporting Multiple HTTP Get Handler functions in the service

    Hi Dmitry, It appears that it is not possible to support two HTTP GET handlers, expecting different URLs. At run time, it picks the first one defined inside the class. Is there any way this can be achieved using any option in the "*location" string. Kindly clarify. Thanks in advance.

    Example:

    //! HTTP Get operation
    // *location: /{arg1}?arg2={arg2}&arg3={arg3}
    // *method: GET
    std::string getHandler(const std::string& arg1,
                           const std::string& arg2,
                           const std::string& arg3,
                           ngrest::MessageContext& context);
    
    //! HTTP Get operation
    // *location: /{arg1}?arg2={arg2}
    // *method: GET
    std::string get2(const std::string& arg1,
                     const std::string& arg2,
                     ngrest::MessageContext& context);
    

    Regards Raajesh

    opened by raadiy 5
  • ngrest returns error while running as apache web server module, but works fine as a standalone module

    ngrest returns error while running as apache web server module, but works fine as a standalone module

    Hi Dmitry,

    I see the following error while running NGREST as an apache webserver module:


    W/14-04-2022 00:19:15.366 ngrest_server.cpp:331 ngrest_server_dispatch: in Json::Value::operator: requires arrayValue


    But, I do not get this error while running it with the inbuilt httpd server that comes with ngrest. Can you please take a look and suggest.

    Thanks Raajesh

    opened by raadiy 4
  • How to install from the source?

    How to install from the source?

    I've cloned this repo, and with CMake built the stuff. It created subdirectory build/deploy/ with two binaries ngrestcg and ngrestserver, shared libraries, etc.

    Attempt to follow the Wiki guide resulted in

    $ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/local -DWITH_EXAMPLES=1 ..
    Skipping Nginx module compilation: no Nginx source path provided
    -- Configuring done
    -- Generating done
    CMake Warning:
      Manually-specified variables were not used by the project:
    
        WITH_EXAMPLES
    
    
    -- Build files have been written to: /Users/ur20980/src/ngrest/build
    

    make test, make check, make install do not exist.

    Attempt to ./run_cppcheck results in

    . . . . .
    ^
    
    ^
    nofile:0:0: information: Cppcheck cannot find all the include files (use --check-config for details) [missingInclude]
    

    Is there a script or such to install the result the right way?

    opened by mouse07410 4
  • New threads crashes with SIGSEGV

    New threads crashes with SIGSEGV

    Hello, guys. First of all, thank you for such a great library! I'm seating whole day on a problem:

    std::string test_service::echo(const std::string& text)
    {
      auto future = std::async(std::launch::async, []()
      {
      });
    
      future.get();
      return "Hi, " + text;
    }
    
    target_link_libraries(
      test_service
      ngrestutils
      ngrestcommon
      ngrestjson
      ngrestengine
      $ENV{NGREST_EXT_LIBS}
      pthread
    )
    

    It is the only change I made to standard project. I'm getting crash with SIGSEGV on any thread creation. Before it I tried 3rdparty libs, those use use threads and they crash too.

    I tried just EVERYTHING on the Internet and Stack Overflow, but nothing helps...

    opened by sedapsfognik 4
  • About macOS install script

    About macOS install script

    When you run the installation script on macOS, you get the message "Running Homebrew as root is extremely dangerous and no longer supported. As Homebrew does not drop privileges on installation you would be giving all build scripts full access to your system." and the installation ends. It happened when your script tried to install CMAKE via homebrew when your script asked for password.

    The second thing is usage of "bit.ly" url and "bash" command and -q0- flag. It looks really suspicious. It is a bad practice.

    opened by CorellianAle 4
  • Fails to build because switches aren't spaced

    Fails to build because switches aren't spaced

    On my Archlinux 64-bit system when I run your installation script this is my output:

    [I][~/programs/ngrest-build]$ ./inst.sh                                                                                      
    Cloning into 'ngrest'...
    remote: Counting objects: 1747, done.
    remote: Total 1747 (delta 0), reused 0 (delta 0), pack-reused 1747
    Receiving objects: 100% (1747/1747), 748.00 KiB | 687.00 KiB/s, done.
    Resolving deltas: 100% (1034/1034), done.
    Checking connectivity... done.
    Configuring ngrest for the build...
    Skipping Nginx module compilation: no Nginx source path provided
    Building ngrest. It may take few minutes...
    cc: error: unrecognized command line option ‘-fstack-protector-strong-I/usr/include/httpd’; did you mean ‘-fstack-protector-strong’?
    make[2]: *** [modules/apache2/CMakeFiles/ngrest_apache2_mod.dir/build.make:63: modules/apache2/CMakeFiles/ngrest_apache2_mod.dir/src/mod_ngrest.c.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:826: modules/apache2/CMakeFiles/ngrest_apache2_mod.dir/all] Error 2
    make: *** [Makefile:84: all] Error 2
    

    The cause of this error is line 6 of file modules/apache2/CMakeFiles/ngrest_apache2_mod.dir/flags.make in the build directory:

    C_FLAGS = -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong-I/usr/include/httpd -I. -I/usr/include/apr-1 -I/usr/include -fPIC

    As you can see, there should be a space between the switches.

    Workaround is to add this line:

    sed -i 's/g-I/g -I/I' "modules/apache2/CMakeFiles/ngrest_apache2_mod.dir/flags.make"
    

    in the installation script after the line:

    echo "Building ngrest. It may take few minutes..."
    
    opened by dbedrenko 4
  • NGREST service works iwith in built ngrest server, but returns

    NGREST service works iwith in built ngrest server, but returns "No service found to handle resource" with Apache web server on RHEL 8.4

    Hi Dmitry,

    Need a help in matching the "Location" directive in ngrest.conf of apache httpd with that defined in the C++ header source file. I have tried several combinations. The test runs as expected with the default web server that comes with ngrest, but when deployed on apache web server gives an error "No service found to handle resource " . Details are below.

    I have defined NGREST service metatags in C++ header as given below:

    //! TEST Resource server /*! TEST resource server for TEST CRUD services */ // *location: testMgmt class testres_svr: public ngrest::Service { public: testres_svr(); ~testres_svr();

        //! HTTP Get operation
        // *location: /{arg1}
        // *method: GET
        void getHandler(const std::string& arg1,
                        ngrest::MessageContext &context);
    
        //! HTTP Patch operation
        // *location: /
        // *method: PATCH
        void patchHandler(ngrest::MessageContext &msgCtx);
    
        //! HTTP POST operation
        // *location: /
        // *method: POST
        void postHandler(ngrest::MessageContext &msgCtx);
    

    };

    I have ngrest module running on Apache web server on RHEL 8.4. How should the "Location" directive be defined in ngrest.conf file

    I have tried several values for Location, but everytime I get an error as given below:

    E/02-04-2022 03:45:35.936 Deployment.cpp:65 deployAll: No services found W/02-04-2022 03:45:35.936 Engine.cpp:100 dispatchMessage: ServiceDispatcher.cpp:364 dispatchMessage : No service found to handle resource /voiceNetworkManagement/scpAddr

    The following is the section in ngrest.conf.

    path to deploy ngrest services from

    ServicesPath /tester

    filters path is optional. comment this line if you do not use filters

    FiltersPath /tester

    location regex on which ngrest is bound.

    <Location ~ "/testMgmt/."> SetHandler ngrest

    Any help will be appreciated.

    Thanks Raajesh

    opened by raadiy 3
  • ngrest crashes upon CTRL + C

    ngrest crashes upon CTRL + C

    Hi Dmitry,

    I made some recent changes to bring up the ngrest server using two shared libraries/objects (It was originally one, I modularized them into two libraries). When I exit the ngrest server (ctrl + c), it crashes every time with the following message. Do you have any suggestions for troubleshooting this.

    ====

    I/12-02-2022 03:09:35.832 Server startup time: 9.643ms I/12-02-2022 03:09:35.832 Simple ngrest server started on port 9098. I/12-02-2022 03:09:35.832 Deployed services: http://localhost:9098/ngrest/services ^CI/12-02-2022 03:09:48.120 Stopping server I/12-02-2022 03:09:48.120 Server finished /home/raajesh/bin/ngrest: line 612: 1638578 Segmentation fault (core dumped) ngrestserver -l "$IP" -p $PORT -s "$BUILD_DIR/services" Server crashed. Waiting for project modifications...

    ====

    Regards Raajesh

    help wanted 
    opened by raadiy 2
  • ngrest and proxy

    ngrest and proxy

    Hello there,

    I've a scenario and need your input about its development feasibility with ngrest.

    So, we're using nginx as webserver, and would like to develop a rest service module for it by ngrest.

    The rest service receives requests (POST method) from various clients. Normally it has to validate the incoming requests (body and headers), and may send response with error to clients in case of malformed or mistakes in requests.

    If validation passed, then my webserver need to act as proxy, so basically request has to be forwarded to other webserver(s) to process and my webserver has to deliver the response back to client.

    Could you please elaborate on this request and it's implementation. Specially the proxy function. What should i consider with ngrest module development and nginx configuration.

    Thanks

    opened by atari83 0
  • Linking static vs. shared external libraries in ngrest build

    Linking static vs. shared external libraries in ngrest build

    I'm having trouble getting ngrest build to complete successfully. The service I'd like to build and deploy has two external dependencies: the MySQL C++ Connector 8.0 with the X DevAPI (https://dev.mysql.com/doc/dev/connector-cpp/8.0/devapi_ref.html), and a smaller library of my own (I'll call it dep for reference).

    Based on the previous discussion I've seen on the Google Groups page, I know that I should incorporate external libraries like these in the PROJECT\SERVICE\CMakeLists.txt script. For MySQL, I've added a FindMYSQL.cmake script parallel to CMakeLists.txt, and I invoke this script to set the appropriate MYSQL_INCLUDE_DIR and MYSQL_LIBRARY variables. For the other library, I have added it in a lib subdirectory of the service (parallel to src), and I build its library by calling add_subdirectory in the script. Based on the Google Groups discussions, I also know that the include directories and libraries should be added as the final arguments of the include_directories and target_link_libraries calls for the service at the end of the script. I have done all of this in my CMakeLists.txt script.

    One thing I've noticed is that if I don't specify that the dep library should be built as a shared library rather than a static library, I get a series of multiple definition errors. I imagine that this is because the library for the service itself has the CMake target build type MODULE, which, to the best of my knowledge, is very similar to SHARED, and linking static libraries into a shared library is generally discouraged. And in fact, if I set BUILD_SHARED_LIBS to ON before I build the dep library, then these errors go away. Am I correct that any external libraries incorporated into an ngrest service will need to be shared libraries rather than static ones?

    I'm also getting a lot of undefined reference errors for MySQL, and since I'm only linking to this library rather than building it, I'm not sure what I'm doing wrong or how I can fix it. My FindMYSQL.cmake script correctly locates the include directory and the mysqlcppconn8.lib library that implements the X DevAPI, but is CMake trying to link to this static library rather than the DLL that it should be using in this case? Any help would be appreciated.

    In case it matters, I am testing this out on Windows 10. I'm aware of the ngrest-db library, and I'm keeping it in mind as an option, but my immediate preference would be to get a basic service running using ngrest alone if possible.

    opened by jjmccollum 1
  • Error while loading shared libraries: libstdc++-6.dll : Windows 10

    Error while loading shared libraries: libstdc++-6.dll : Windows 10

    C:/Users/xxx/AppData/Roaming/ngrest/ngrest-build/deploy/bin/ngrestcg.exe: error while loading shared libraries: libstdc++-6.dll: cannot open shared object file: No such file or directory Failed to create project [my_ngrest_project] with services [my_ngrest_project] /home/xxx

    opened by dharanivp 0
  • Add docker file for development environment

    Add docker file for development environment

    Hi,

    Thank you so much for your great REST framework. It's a real pleasure to use and one of the very few C++ REST frameworks.

    I tried to deploy my application on a private server and I usually do this using docker containers. Therefore, I created a docker file that can be used for development purposed and as base for a production container.

    The README file explains the handling of the docker file. I think it would be best if you could integrate that information into the wiki.

    Thanks again!

    opened by agentS 0
  • NGREST Crashes after some time running

    NGREST Crashes after some time running

    Dear all,

    When running ngrest for a while, I get a crash. I have compiled in debug, and got the following stack trace. If you can give me some advise on this, I would appreciate it.

    Thanks,

    [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by ./bin/kpsr_bst_eventloop_example -a 9090'. Program terminated with signal SIGABRT, Aborted. #0 0x00007fc076698428 in __GI_raise ([email protected]=6) at ../sysdeps/unix/sysv/linux/raise.c:54 54 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. [Current thread is 1 (Thread 0x7fc074e38700 (LWP 4402))] b(gdb) bt #0 0x00007fc076698428 in __GI_raise ([email protected]=6) at ../sysdeps/unix/sysv/linux/raise.c:54 #1 0x00007fc07669a02a in __GI_abort () at abort.c:89 #2 0x00007fc0766da7ea in __libc_message ([email protected]=2, [email protected]=0x7fc0767f3e98 "*** Error in%s': %s: 0x%s **\n") at ../sysdeps/posix/libc_fatal.c:175 #3 0x00007fc0766e64aa in malloc_printerr (ar_ptr=0x3, ptr=, str=, action=3) at malloc.c:5006 #4 _int_realloc ([email protected]=0x7fc058000020, [email protected]=0x7fc058002db0, [email protected]=7162798707571975528, [email protected]=4112) at malloc.c:4252 #5 0x00007fc0766e7839 in __GI___libc_realloc (oldmem=0x7fc058002dc0, bytes=4096) at malloc.c:3045 #6 0x00007fc075ed5d6d in ngrest::MemPool::newChunk (this=0x7fc06c002e60, size=4096) at /home/pablogh/thirdparties/ngrest/core/utils/src/MemPool.cpp:156 #7 0x00007fc0777be82d in ngrest::MemPool::grow (this=0x7fc06c002e60, growSize=32) at /home/pablogh/thirdparties/klepsydra/kpsr-admin/../../ngrest/build/deploy/include/ngrest/utils/MemPool.h:211 #8 0x00007fc0777ced1e in ngrest::MemPool::alloc<ngrest::NamedNode, char const> (this=0x7fc06c002e60, p1=0x7fc0777dc666 "type") at /home/pablogh/thirdparties/klepsydra/kpsr-admin/../../ngrest/build/deploy/include/ngrest/utils/MemPool.h:74 #9 0x00007fc0777d3b67 in kpsr::admin::PublisherStatisticsSerializer::serialize (context=0x7fc06c003c58, value=..., node=0x7fc058006c5c) at /home/pablogh/thirdparties/klepsydra/kpsr-admin/build/modules/core/ngrest_codegen/publisher_statisticsWrapper.cpp:60 #10 0x00007fc0777c716c in kpsr::admin::restapi::RestAdminInterfaceWrapper::Callback_getAllPublisherStatistics::success (this=0x7fc058005e08, result=std::vector of length 17, capacity 17 = {...}) at /home/pablogh/thirdparties/klepsydra/kpsr-admin/build/modules/core/ngrest_codegen/rest_admin_interfaceWrapper.cpp:209

    opened by klepsydra-technologies 7
Owner
Dmitry
Dmitry
Corvusoft's Restbed framework brings asynchronous RESTful functionality to C++14 applications.

Restbed Restbed is a comprehensive and consistent programming model for building applications that require seamless and secure communication over HTTP

Corvusoft 1.4k Mar 8, 2021
ORM for consuming RESTful APIs in C++

restful_mapper ORM for consuming RESTful APIs in C++ Introduction restful_mapper connects business objects and Representational State Transfer (REST)

Logan Raarup 79 Jul 19, 2022
Ole Christian Eidheim 737 Aug 6, 2022
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ News Hey, meet the new oatpp version 1.2.5! See the changelog for details. Check out the new oatpp ORM - read more here. Oat++ is a modern Web F

Oat++ 5.6k Aug 10, 2022
A Fast and Easy to use microframework for the web.

A Fast and Easy to use microframework for the web. Description Crow is a C++ microframework for running web services. It uses routing similar to Pytho

Crow 1.1k Aug 7, 2022
modern c++(c++17), cross-platform, header-only, easy to use http framework

cinatra--一个高效易用的c++ http框架 English | 中文 目录 使用cinatra常见问题汇总(FAQ) cinatra简介 如何使用 快速示例 性能测试 注意事项 roadmap 联系方式 cinatra简介 cinatra是一个高性能易用的http框架,它是用modern

qicosmos 1.4k Aug 2, 2022
modern C++(C++11), simple, easy to use rpc framework

modern C++(C++11), simple, easy to use rpc framework

qicosmos 1.1k Aug 4, 2022
A simple and easy WiFi-enabled ESP8266-powered WSPR and FT8 beacon which uses NTP + DS3231 RTC for timing.

Easy-Digital-Beacons-v1 A simple and easy WiFi-enabled ESP8266-powered WSPR and FT8 beacon which uses NTP + DS3231 RTC for timing. The whole design is

Dhiru Kholia 26 Aug 1, 2022
An easy to use and powerful open source websocket library written in C.

libwebsock Easy to use C library for websockets This library allows for quick and easy development of applications that use the websocket protocol, wi

Jonathan Hall 46 May 4, 2022
BingBing 54 Jul 27, 2022
Easy automated syncing between your computers and your MEGA Cloud Drive

Easy automated syncing between your computers and your MEGA Cloud Drive

Mega Limited 1.2k Aug 1, 2022
Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services.

Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services. The project is unique among realtime push solutions in that it is designed to address the needs of API creators. Pushpin is transparent to clients and integrates easily into an API stack.

Fanout 3.1k Aug 4, 2022
Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!

Do you have a question that doesn't require you to open an issue? Join the gitter channel. If you use uvw and you want to say thanks or support the pr

Michele Caini 1.5k Jul 30, 2022
an easy implementation of a multi-process tcp server and a multi-thread tcp client

一个TCP多进程服务器-多线程客户端的简单实现。 客户端类似Apache ab的测试功能,能够通过向某一个ip端口发送指定并发量和总数量的tcp短连接;服务端处理tcp短连接,每来一条消息就打印一条log。 使用cmake编译,建议在vscode里编译,或者命令行 # 终端进入目录 mkdir bu

adin 1 Nov 28, 2021
Webdav-client-cpp - C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.

WebDAV Client Package WebDAV Client provides easy and convenient to work with WebDAV-servers: Yandex.Disk Dropbox Google Drive Box 4shared ownCloud ..

Cloud Polis 102 Jul 10, 2022
A high-performance and easy-to-use C++ network library.

pine A high-performance and easy-to-use C++ network library. Now this is just a toy library for education purpose, do not use in production. example A

Baroquer 53 Jul 31, 2022
A collection of C++ HTTP libraries including an easy to use HTTP server.

Proxygen: Facebook's C++ HTTP Libraries This project comprises the core C++ HTTP abstractions used at Facebook. Internally, it is used as the basis fo

Facebook 7.6k Aug 8, 2022
Easy-to-use HTTP C library

LibHTTP LibHTTP is a C library easy-to-use which implements the base of the HTTP protocol. Info's about LibHTTP LibHTTP is an easy-to-use HTTP library

null 6 Dec 10, 2021