Node.js is an open-source, cross-platform JavaScript run-time environment that executes JavaScript code outside of a browser:

Node.js lets developers use JavaScript to write Command Line tools and for server-side scripting—running scripts server-side to produce dynamic web page content before the page is sent to the user’s web browser.

Node.js led to Callback Hell Which then was solved by the introduction of Node 7.6  Async/Await Support and “promises”


To get the data from node to a web browser,  use a RESTful node.js server, coupled with a client-side data-grid that communicates with a REST server.

This example uses dojo’s dGrid on the client and Express for a REST API on the server: It uses MongoDB, so you’ll need to replace those parts with the code you have to connect to an Oracle DB instead.

Another alternative is Backbone.Datagrid, which uses the client-side Backbone.js framework to communicate with a REST service: There are a lot of tutorials out there that details how to connect the Backbone client-side framework with various node.js REST servers (Express, Restify, etc).

Better client-side data grids : jqGrid and SlickGrid,  Here are a couple links on getting jqGrid working with a REST server:

Good Grids:

Best inline editing with enter:

has keyboard handling:!grid/grid-21

List of grids:

List of grids:


npm is a package manager for the JavaScript programming language.

It is the default package manager for the JavaScript runtime environment Node.js.

Express.js is a fast, non-opinionated, minimalist back end development web framework for Node.js.
Other frameworks are more abstract but slower than Express.js.

Assuming you’ve already installed Node.js, create a directory to hold your application, and make that your working directory.

$ mkdir amirapp
$ cd amirapp

Use the npm init command to create a package.json file for your application. For more information on how package.json works, see Specifics of npm’s package.json handling.

$ npm init

This command prompts you for a number of things, such as the name and version of your application.

Hit RETURN to accept the defaults for most of them, with the following exception:

entry point: (index.js)

Enter mirappindex.js, or whatever you want the name of the main file to be. If you want it to be index.js, hit RETURN to accept the suggested default file name.

Now install Express in the myapp directory and save it in the dependencies list.

$ npm install express –save

var amirexpressv =require(‘express’);

var amirapp=express();


===================================== does a back end development framework like express.js but is more abstract. Express is closer to node.js itself.
Electron a open-source software framework that enables cross-platform desktop applications and handles the architecture of getting Node.js and Chromium to play together. Electron allows for the development of desktop GUI applications using Node.js run time for the back end and Chromium for the front end. 



Connection from Node.js to SQL

const mysql = require('mysql');
const pool  = mysql.createPool({
  host     : '',
  user     : 'bob',
  password : 'secret',
  database : 'my_db'
const getConnection = () => {
  return new Promise((resolve, reject) => {
      pool.getConnection(function(err, connection) {
        if (err) {
        else {
module.exports = {

And you can get a connection from this pool like this:

getConnection().then((conn) => {
   conn.query(<your query>, (error, results, fields) => {
         // do things here;

Since 11 April 2023: 1,065 total views,  23 views today