Skip to content

Create and run a service manually

Dmitry edited this page Oct 20, 2020 · 1 revision

How to create and deploy a service using ngrest which is built manually from sources.

Generate server project template

Project name: calc

Service name: org.tmpuri.Calc

mkdir -p ~/devel/echoservice
cd ~/devel/echoservice
/opt/ngrest/bin/ngrestcg -t project -n echoservice -d services=org.tmpuri.Echo

Build service

mkdir -p ~/devel/echoservice-build
cd ~/devel/echoservice-build
cmake ../echoservice
make

Start ngrest server with your service

/opt/ngrest/bin/ngrestserver -s deploy/share/ngrest/services/

After you start the ngrest server your service should be accessible from http://localhost:9098/ngrest/service/org.tmpuri.Echo