Hi,
Deployed ngrest under nginx. I have create two services(add,get)
santhosh@santhosh-Lenovo-U310:~$ ls restapi/
add CMakeLists.txt get
copied the lib to following location
--------------------------------
santhosh@santhosh-Lenovo-U310:~$ ls -l /opt/ngrest/services/
total 652
-rwxr-xr-x 1 root root 310344 Oct 13 11:30 add.so
-rwxr-xr-x 1 root root 353232 Oct 13 11:30 get.so
And added location in site-enabled config
--------------------------------
location ~ /(ngrest|restapi|get|getAll) {
ngrest /opt/ngrest/services;
}
location ~ /(ngrest|restapi|add|addRecord) {
ngrest /opt/ngrest/services;
}
loaded ngrest module and added included site-enabled in nginx.conf
--------------------------------
load_module /home/santhosh/.ngrest/ngrest-build/deploy/share/ngrest/modules/nginx/mod_ngrest.so;
include /etc/nginx/sites-enabled/*;
Able to do getAll service from browser
http://localhost/get/getAll{
"result": [
{
"empId": 200,
"empName": "jai",
"empOrg": "aticara"
},
{
"empId": 100,
"empName": "madhu",
"empOrg": "isoke"
},
{
"empId": 400,
"empName": "mohan",
"empOrg": "isoke"
},
{
"empId": 300,
"empName": "santhosh",
"empOrg": "aticara“ "
}
],
}
Similarly not able to do for add(POST) service
http://localhost/add/addRecord?id=123&name=skumar&org=aticaraFor your reference i have added my source code. pleaes advice how to resolve this.
Thanks,
Kumar