Reputation: 449
I have developed a hybrid app on mobilefirst, and I wish to use a bluemix service. so I think the best solution is creating a nodejs app in bluemix and adding the needed service.
But I don't know how to connect both apps.
Upvotes: 0
Views: 363
Reputation: 117
Some bluemix services requires to have the app bound to your application. One way to handle this would be to deploy your MFPF Server in Bluemix using docker bound to your nodejs app, with all the services bound to it.
The idea here is your docker is bound to the nodejs, and the services are bound nodejs app, then this allow the services to be visible to the container.
This would be the case for example for SQL Database services.
Other Services are exposed outside the bounded app, such as Cloudant that has a public api for it.
To explore this observe the syntax of the command "ice group create"that you could to use to create a container group bound to app:
ice group create [-h] [--name NAME] [--memory MEMORY] [--env ENV] [--volume VOL] [--publish PORT] [--min MIN] [--max MAX] [--desired DESIRED] [--bind APP] [--auto] IMAGE [CMD [CMD ...]]
The key option would be "--bind APP". This same action could be done via the bluemix dashboard on the option to "Start Containers".
There is a sample app here that explores Watson Services + MFPF, without using the docker approach:
https://github.com/IBM-MIL/IBM-Ready-App-for-Banking
Upvotes: 0
Reputation: 44516
You can find online many examples describing how to use MobileFirst Adapters in order to access Bluemix services.
Review the following.
Once you when a technical question, open another.
MobileFirst Platform Foundation Labs - showing how to implement and integrate various features, including Bluemix services: https://developer.ibm.com/mobilefirstplatform/labs/
Implementation on an MobileFirst app which accesses the Watson question & answer service: https://developer.ibm.com/mobilefirstplatform/2015/04/29/using-http-adapters-to-access-watson-question-and-answer-service-at-ibm-bluemix/
Upvotes: 1