loentar / ngrest

Fast and easy C++ RESTful WebServices framework
Apache License 2.0
465 stars 94 forks source link

creating multiple services manually #88

Closed raadiy closed 2 years ago

raadiy commented 2 years ago

Hi Dmitry,

The URL https://github.com/loentar/ngrest/wiki/Create-and-run-a-service-manually shows how to run a service manually. Is there a way we can generate multiple service templates at the same time. In other words: The following is for generating one service. /opt/ngrest/bin/ngrestcg -t project -n echoservice -d services=org.tmpuri.Echo

However, if I want to generate more than one template, what is the command line? Kindly clarify. Thanks Raajesh

loentar commented 2 years ago

Hi,

it's much easier to create and add services using ngrest script like this:

ngrest create echoservice org.tmpuri.Echo
ngrest addservice echoservice2 org.tmpuri.Echo2

But if you strongly prefer codegen CLI you may try this (make sure you created backup of your project first!):

  1. enter project root
  2. /opt/ngrest/bin/ngrestcg -t addprojectservice -n echoservice2 -d services=org.tmpuri.Echo2
  3. cat CMakeLists.txt.append >> CMakeLists.txt
  4. rm -f CMakeLists.txt.append
raadiy commented 2 years ago

Thank you Dmitry. I will try this