Start a new topic
Answered

Kinvey Flex SDK

Need information on how to make use of Kinvey Flex SDK to remove the server less architecture. Any help is appreciated. 


Best Answer
Suraj,

No. We don't need to give any special access in the console in order to config the Kinvey-cli locally.

I reviewed the logs and found that you have 2 separate apps on 'fi-us1' and 'fi-us2'. Please make sure you are using the correct host where Flex service is created. Have you tried the following?


If the above suggestion doesn't work, then I will get inputs from engineering on this issue.

Thanks,
Pranav
Kinvey

Hello Surya,


Thank you very much for moving your question to the Forum.


Can you describe your use case in greater detail, please. We don't understand what you're trying to accomplish. The Kinvey Flex SDK is a serverless architecture and you're asking to remove it. Can you help us understand what you are trying to accomplish?


Regards,


Billy Gee



Apologies. Actually, I wanted to remove the server which I am using for my purpose. Nonetheless, I wanted to understand a concept of this Kinvey Flex SDK. The use case goes below,


 I am into Node JS and I have to code something in such a way that I should use "kinvey flex sdk" to make GET or POST request. A simple example would be fine. 


Example: I have a setup to enter username/password. Need to make use of "kinvey flex sdk" to POST it using request.post() method. Kinvey's part would be to authenticate the user and send a token back or a mere string "Authenticated". 


App Key - kid_S1Va9pr1b


Please help.


Regards

Suraj

Hi,


Also when I created a collection in Kinvey and tried to create a Flex service through service catalog. I am getting the attached error also. Please help me with this. 

FlexError.PNG
(11.9 KB)

Hi there,


Could anyone tell me how to create a service object for a Flex service in service catalog of Kinvey, while creating service type for the Collections in Kinvey?


Thanks

Suraj,


Regarding your issue about "Server listening to 10001 - nothing happens for GET/POST requests", have you added and installed 'request' module to package.json? I have tested the code mentioned in the Flex docs and it is working fine.



Now, regarding your question about creating a service object for a Flex service in service catalog, have you tried "kinvey deploy" command? Here is the link http://devcenter.kinvey.com/ios/guides/flexservice-runtime#DeployingFlexServices


This command deploys preconfigured NodeJS services to the FlexService Runtime and starts them. Once you do this successfully, you will be able to set a service object in service catalog.



Let me know if you come across any issues again.


Thanks,

Pranav

Kinvey

Hi Pranav,


Thanks for the prompt reply. But I have still got doubt on how to link my Node JS service code to the service Object in Kinvey FSR. The documentation does not provide information on that. What I understood so far is,


1. We need to create a service in Node JS which will be hosted in Kinvey as a collection having service type as Flex Internal Service,

2. We need to create the service object in the service linked with the Node JS service.

3. Through Kinvey CLI commands, we need to activate the Flex service, this would be deploying the code in Kinveys server.

4. Using kinvey console, we can access the code's output using GET or POST request.


I need to know how to link the service file with the Kinvey Flex service catalog. 


Thanks

Suraj

Suraj,

Are you able to configure Kinvey cli before deploying?
http://devcenter.kinvey.com/ios/guides/flexservice-runtime#ConfiguringtheKinveyCLI

Use following command :
kinvey config --host https://manage.kinvey.com

 


You will be prompted for your Kinvey credentials if you haven't logged in yet. These are the same credentials used when logging in to the Kinvey Console. Once you are done with configuring, try "kinvey deploy" and let me know how it goes.


Thanks,

Pranav

Kinvey

Hi Pranav,


I am afraid, I am not able to login using y credentials through the command kinvey config --host https://manage.kinvey.com. It shows "warning: Invalid credentials, please authenticate". They are the credentials with which I generally login to Kinvey console.


Is there any other way that includes creating separate credentials for Kinvey CLI.


One more thing, we can access kinvey CLIs command prompt through the normal Node JS command prompt right? 


Thanks

Suraj

Hi Pranav,


Now, I was able to login using the credentials to https://manage.kinvey.com. It asked whether I wanted to access the below,

1. apps

2. organization.


When I selected "apps", I was displayed a set of applications which I have created in https://console.kinvey.com/.

I have my Flex service in a different host URL provided by kinvey. Is there a command to access the application in that host. 


The other host URl would be from my project, something like "https://*****.console.kinvey.com/".


Regards

Suraj

Suraj,

What version of kinvey-cli you are using? Please update it if you are not using the latest one.

As you are using a dedicated instance,  the 'config' command takes an optional [instance] parameter in order to deploy FlexServices to dedicated instances of Kinvey. Check https://github.com/Kinvey/kinvey-cli#proxy-settings.

Also, for more information, run "kinvey -h".

 

Thanks,

Pranav

Kinvey

Pranav,


Do we need to give some special access in the kinvey console account in order to config the Kinve CLI locally? 

Answer
Suraj,

No. We don't need to give any special access in the console in order to config the Kinvey-cli locally.

I reviewed the logs and found that you have 2 separate apps on 'fi-us1' and 'fi-us2'. Please make sure you are using the correct host where Flex service is created. Have you tried the following?


If the above suggestion doesn't work, then I will get inputs from engineering on this issue.

Thanks,
Pranav
Kinvey

Hi Pranav,


Thank you so much for this particular answer. This saved my day.

I was initially using "kinvey config --host https://fi-us1-console.kinvey.com" and not "kinvey config --host https://fi-us1-manage.kinvey.com". I rectified this one. Will let you know if I face any other issues.


Thanks

Suraj

Login or Signup to post a comment