on YouTube
why? calculate sum is used as a quick start template for vangav backend to help new users get to speed within the first 10 minutes; this template covers all the core basics to develop a fully functional backend service without a database
- calculate sum service is generated using vangav backend
- this services takes two floating point numbers as a request and returns the summation of those numbers as a response
- this service is based on vangav backend's calculate sum template
- this service has the 90+% of the vangav backend's generated code + the 10-% of the logic code needed to complete the service
- for first timers - follow the steps in the system requirements tutorial
- for first timers - follow the steps in the workspace initialization tutorial
- download this
vos_calculate_sum.zip
project (from the greenclone or download
button up there) inside the workspace directory created previously (my_services
) and unzip it - rename unzipped
vos_calculate_sum-master
tovos_calculate_sum
- in the terminal
cd
tovos_calculate_sum
- start the service:
./_run.sh
- from your prefered client (we recommned postman) start trying the service; refer to the features and service references sections for reference
- at the end to stop the service: press
control + d
in the terminal session where the service was started in (6)
- follow the following steps to import the downloaded backend service in eclipse
cd
to the service's directory and execute the./_eclipsify.sh
script- file > import > general > existing projects into workspace > next > set "select root directory" to my_services > under projects make sure that vos_calculate_sum is selected > finish
- double check the java version used for compiling the project: right click the project > properties > java compiler > enable project specific settings > compiler compliance level > 1.7 or 1.8
- generating a simple service
controller | feature |
---|---|
calculate sum | adds up two floating point numbers |
reference | explanation |
---|---|
routes | api routes |
controllers.json | api request/response's elements |
controllers | api implementation |
- this section lists the 10-% code added after vangav backend generated 90+% of the code
file/dir | change |
---|---|
controllers | added the implementation of request-to-response logic in processRequest methods under controller_name/HandlerControllerName.java classes |