
Using full stack we will be able to create the HTML5 web module.
#npm init
{
"name": "plbapp",
"version": "1.0.0",
"description": "Nodejs App to connect to HANA DB",
"main": "index.js",
"scripts": {
"test": "echo The connecton successfull",
"start": "node /home/user/demonodejs/plbapp/index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/pallabhaldar/HANA2.0.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/pallabhaldar/HANA2.0/issues"
},
"homepage": "https://github.com/pallabhaldar/HANA2.0#readme",
"dependencies": {
"@sap/hana-client": "^2.15.19"
}
}
user: demonodejs $ npm install @sap/hana-client
var hana = require("@sap/hana-client");
var conn = {
serverNode: "f5b68294-bd42-4e68-a1c9-4bfbf5a2f32d.hana.trial-us10.hanacloud.ondemand.com:443",
encrypt: "true",
sslValidateCertificate: "false",
uid: "DBADMIN",
pwd: "**********",
};
var hanaConnect = hana.createConnection();
hanaConnect.connect(conn, function (err) {
if(err){
console.log(err);
}
else{
hanaConnect.exec("SELECT * FROM EMPLOYEE",
function (err, result) {
if (err) throw err;
console.log(result[0]);
console.log(result[1]);
console.log(result[2]);
hanaConnect.disconnect();
}
);
}
});
user: demonodejs $ npm start
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
7 | |
7 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 | |
4 |