-
Notifications
You must be signed in to change notification settings - Fork 94
Build ngrest from source code
Dmitry edited this page Oct 20, 2020
·
2 revisions
How to build ngrest from source code without using ngrest installer.
First make sure you have git, CMake and GCC installed. If you unsure just start this:
sudo apt install git cmake g++
This command is for Debian/Ubuntu APT packet manager and may differ for other distributions OS.
mkdir -p ~/install
cd ~/install
https://github.com/loentar/ngrest.git
mkdir -p ~/ngrest-build
cd ~/ngrest-build
cmake ../ngrest -DCMAKE_INSTALL_PREFIX=/opt/ngrest -DCMAKE_BUILD_TYPE=DEBUG -DWITH_EXAMPLES=1 -DWITH_TESTS=1
make
-DCMAKE_INSTALL_PREFIX=/opt/ngrest
specifies the installation directory.
To build debug version use -DCMAKE_BUILD_TYPE=DEBUG
.
The -DWITH_EXAMPLES=1
and -DWITH_TESTS=1
arguments enable examples and tests respectively.
make test
make install
cd /opt/ngrest/bin
./ngrestserver
Now you can try it from web browser: http://localhost:9098/ngrest/services .