Bluemix + Node.js - Is there documentation for the watson-developer-cloud module? - node.js

I am interested in playing around with the Q & A service, the demo app uses the REST API and I am wondering if the service can be used with the newer watson-developer-cloud module and if so where can I find an example or documentation for those functions.
The demo is online at Q&A Node.js demo but this uses the older REST API.
Thanks,
Andy

Yes, you should be able to use the service with the newer watson-developer-cloud module, but there's no updated demo. Note, that the module was not changed drastically enough that it should really matter.

The README.md file for the Github repository containing the project has a full set of usage instructions.

Related

Is is possible to make Desktop App with Nodejs along with Online connectivity

I am trying build an application that can run offline and online too. If the application is offline it must run with minimum functionality and if it get an internet it automatically push data online Any references or tutorials would be appreciated.
any references that can help me to achieve this.
Yes, surely that's possible and you already mentioned the tools: node.js and electron are suitable. Most electron apps do that (whatsapp and joplin directly come to my mind).
You can look in the source of those already available apps, but it might be difficult. I would start with the tutorial of electron and search for the features as "check internet connectivity" (i.e. here on stackoverflow)
Your question is a bit to broadly stated to help in detail.
Yes, surely that's possible. you can use the node.js and electronJs with Angular are suitable.
For Angular and NodeJs refer the below document:
Build a Basic CRUD App with Angular and Node
For ElectronJs refer the below demo project:
Electron Samples
Best luck !!

Nodjs API development -Best practice of versioning the API

I need to develop an API using NodeJS.But I am not an expert in the nodejs. For the versioning of the API, I found one method where we should keep 2 folders for V1 and V2 versions. Is this the best practise to follow for my API development. Please suggest the best approach? and also suggest the project structure.
Thanks in advance
You should keep the API version as a variable that is configurable (ex. in .env file). You can then version your API by adding the version to the path of your root endpoint (ex. /my-api/v1/api-resource). And when a new version of the API is developed just change the version to v2.
I think that solution of two different directories is not good, because you would have to copy code around and it can quickly mess things up. If you want to have different versions of the API separated you should use some type of version control and develop your v1 on a separate branch (ex. v1) and when the development of that version is complete just create a new branch for the new version (ex. v2).
You should also look into REST as the architectural style of your API: https://restfulapi.net/
I have also created a template for the development of backend systems in Node.js that is based on REST architecture, so you can check out the directory structure and architecture of Node.js projects.

IBM Natural Language Processing Projects (Beginner getting started question)

I've been digging into the IBM Cloud Services, Watson and NLP. Just installed the CLI and tried with Node SDKs, and a starterkit, unfortunately I did not succeed by trying to get a sample code by default to understand how it works.
After that, I did some research get a better open minded approach to how actually I could use some of their free services to get started, but there's actually to vague information, even though the IBM Docs are pretty extensive and well written, it can get very confusing.
I would appreciate any open source repo, or working/live project that you are willing to share to make a better image in my mind about it IBM cloud services.
A few days ago I wrote a sample application using the Natural Language Understanding service. Check the source code here: https://github.com/watson-developer-cloud/natural-language-understanding-code-pattern
The README has instructions on how to get the apikey which is the way you will use to authenticate your API calls.
Since you are using Node.js you can start with the sample above and also look at this page: https://cloud.ibm.com/apidocs/natural-language-understanding/natural-language-understanding?code=node which includes examples for all the features in Node.js using the node-sdk: https://github.com/watson-developer-cloud/node-sdk/

Is StrongLoop a Rest API builder or a deployment tool?

In the documenation says that is a set of Node.js modules used for building rest APIs
Although here :
https://strongloop.com/strongblog/node-js-deploy-production-best-practice/
says that is a tool that can help you deploy any node app using strong-build ,
strong-deploy and strong-pm modules.
Can someone shed some light on this confusion ?
If is used for deployments of node.js apps is there any straight forward documentation explaining how?
Thanks
StrongLoop is the name of the company - the REST API framework that they provide is called LoopBack.
LoopBack, strong-build, strong-deploy and strong-pm are all separate tools, but are all accessed using the StrongLoop command-line tools, which can be accessed using the slc command.

Any good NodeJS repos I can reference when building node RESTful API server?

I built a few nodeJS webapps earlier this year, but nodeJS development has been so fast that I feel like I'm already out of date. Any good nodeJS repos out there that do a great job building a RESTful api? (in terms of code organization, style, usage of npm modules, etc?)
Thanks so much for any help!
You should give Express a try, it's a web framework like Sinatra. There are a lof of example on using it on the github repo: https://github.com/visionmedia/express/tree/master/examples
Here's a nice article with code sample: http://fabianosoriani.wordpress.com/2011/08/15/express-api-on-node-js-with-mysql-auth/
I am using express on a webapp and are really satisfied with the request mapping for urls and static content. It also can create basic project structure for a quick start.
https://github.com/visionmedia/express
If your goal is a fast API development: https://github.com/kilianc/node-apiserver
Why don't you try node-restify? It's inspired by express and is aimed at creating RESTFull api's :)

Resources