Create a REST Web Service using Node.JS - node.js

i need to create a web service to connect to an oracle database from a mobile application
i found some tutorial about creating a web service by using NODE.JS
my question : is it possible to create a REST web service with Node.js to connect to oracle database from my mobile apps ??
if you have an other idea how to create a rest web service using php plz tell me

Php is one thing: a language; NodeJS is another thing: a software platform used to build network applications in JavaScript. I assume you want to develop in JavaScript and not Php.
Yes, it is possible to do what you want. Look into the following packages:
oracle db driver: driver to connect from your node.js app to the oracle db
express: a web development framework
In summary, express will serve as your web server, it will define the REST service endpoints, receive the mobile client's requests, fetch the data from the Oracle db with the help of the aforementioned db driver, and return this data to the mobile client.
You can get started fast with express by generating a base skeleton app just by running:
$ express myAppName

Absolutely. For the REST server side of things, you might be interested in express or restify From the REST server / application you can use something like node-oracle to connect to the Oracle database.

Related

Connecting to oracle data visualisation cloud service with node js

I’m looking to integrate reports/charts from oracle data visualisation cloud service to my web application which is using node js for backend and angular for front end. I have a dev server in oracle cloud with the reports and charts ready. How can I get started to use the api from oracle cloud using node js . Is there any modules that support this ? Or can any one guide me on how to establish the connection and authenticate it. Can anyone share related documents as well. Thanks in advance

Run Phonegap applicaton with node-express

I wanted to make mobile app from existing webapp. My webapp is nodejs-exressjs REST API server, with HTML/JS client.
I wanted to leverage API from my REST server, and swap out client with phonegap/cordova based mobile app.
Till now, the only feasible solution seems to be use CORS, and have phonegap/cordova server and nodejs servers running separately.
Is there a way I can use same server to deploy both my REST Server, and Phonegap/Cordova Client ?
No sorry, Cordova apps rely on having the front client in local, and perform calls to server in REST, so your first thought is correct. You can share the REST server for both applications, but the code of the cordova app client is going to be in the devices locally, without need of a server.

Running Mongodb CRUD API on azure (for Ionic)

I'm trying to run a MongoDB (using NodeJS and Express) on the Azure Server as a server side part of my ionic app.
Once placed on Azure I'd like to access it with my Ionic App using CRUD operations.
What steps do I go through after acquiring a Azure Portal account? Do I take Mobile Services or a simple Web Api?
Is there something specific that I need to add to the NodeJS server?
Generally, the app using Node and MongoDB as the backend for mobile client hosted on Azure App Service, such as WebApps, Mobile Apps (recommended).
Based on my understanding, I think there are some documents that may be helpful for you, please see them below.
For Web Apps, you can refer to the tutorial Get started with Node.js web apps in Azure App Service.
For Mobile Apps, I think your ionic app was based on cordova, there is a tutorial for getting started with cordova Create an Apache Cordova app. And Two related blogs shown a sample of Node + MongoDB on Azure for mobile, please see below.
Exposing MongoDB collections on the node.js backend
Querying MongoDB collections via the Azure Mobile Service node.js backend
To deploy the app to Azure App Service, you can try to publish it via FTP, git, or IDE like VS, please see https://azure.microsoft.com/en-us/documentation/articles/web-sites-deploy/.
Hope it helps. Any concern, please feel free to let me know.

Is it possible to run a NodeJS app using phonegap?

I have a web app that is hosted on a web server that was created using NodeJS (http://www.ruffle.us). What I want to do is make this web app into a mobile application gaining access to the contact list to enter phone numbers. I have looked at technologies such as phonegap/cordova for this task but am still unsure from the documentation. Any experience or input on this would be appreciated.
Cordova provides a browser environment, so you can't run Node.js in it. But you can of course run your web frontend inside Cordova and use it to get access to device APIs like the contact list and communicate with your server.

Best way to broadcast SQL Azure Database for consumption by Ember.js app?

I am working with a team to create an MS Azure hosted web app following the ember.js framework. This app needs to interface with a sql Azure database, and I am wondering what the best way to broadcast that database would be. This needs to be a secured connection.
On the client side, we are looking to use Ember Data to consume JSON output from the Database, but I am confused as to how to make the connection on the server side. Should I be creating a RESTful web service using node.js or Windows Azure Mobile Services?
Yes. You will need to expose data via a HTTP server. Ember.js is totally agnostic about server solutions so this can be written in any language you want. If you are writing this server from scratch and can match the semantics of the sample Adapter included with ember-data you'll find it works pretty much "out of the box"

Resources