Skip to content

Node.js wrapper to access your traditional MySql Database at real time, sync your data between multiple users at real time, no need of refresh, no need of AJAX.( good for web based real time projects).

vaibhav1929/realnode.io

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

realnode.io

Want to develop real-time web project to boost your users' productivity? use realnode.io A Node.js wrapper to access your traditional MySql Database at real time, sync your data between multiple users at real time, no need of refresh, no need of AJAX.( good for web based real time projects).

Example Project

mediaio_realnode_record

Installing

A step by step guide to use realnode.io>>>
step 1: first you need to install all following node modules.
->express
->socket.io
->mySql
->http (if not installed)

step 2: include server-app.js file in your project root directory. It will handle all the server - side processes.

step 3:include client-app.js file in public folder in your project.It will handle all the functions used to fetch the data and easily bound with UI.

step 4:Configure your mysql database connection using initMysql() function, port numbers, and request handlers in server-app.js

Documentation

client-app.js contains 4 functions.

1.fetchData(socket,data,callbackFunction):
Used to fetch latest data from your database.

  • socket object used to emit the events.
  • data is a JSON object with 2 required properties:
    1.selectQuery-> Select query to fetch latest data.
    2.isBroadcast-> Boolean value.
    -> set true = to broadcast the fetched data.(sends data to all connected users.)
    -> set false = to share the fetched data only with single user.(user who performed the action will receive the data, not others).
  • callbackFunction() specifies callBack Function called when fetchData() compeltes its job.
2.boundInsert(socket,data,callBackFunction) : To perform insert operation.
  • data is a JSON object with 2 required properties.
    1.sqlQuery-> Your insert query.
    2.selectQuery-> Select query to fetch latest data.
3.boundUpdate(socket,data,callBackFunction) : To perform update operation.
  • data is a JSON object with 2 required properties.
    1.sqlQuery-> Your update query.
    2.selectQuery-> Select query to fetch latest data.
4.boundDelete(socket,data,callBackFunction) : To perform delete operation.
  • data is a JSON object with 2 required properties.
    1.sqlQuery-> Your delete query.
    2.selectQuery-> Select query to fetch latest data.
Note: for more details, checkout the sample project.
This is initial release of realnode.io, future updates will make it more efficient.

About

Node.js wrapper to access your traditional MySql Database at real time, sync your data between multiple users at real time, no need of refresh, no need of AJAX.( good for web based real time projects).

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published