SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

SAP HANA XS Advanced - Web Sockets within Node.js SAP HANA applications

Using web sockets with Node.js and SAP HANA

Overview

🎓 intermediate 15 min. SAP HANAIntermediateExpress Edition
Thomas Jung T Thomas Jung November 1, 2022
Created by September 16, 2016
Contributors

Prerequisites

Prerequisites

  • This tutorial is designed for SAP HANA on premise and SAP HANA, express edition. It is not designed for SAP HANA Cloud.
  • Tutorials: Text Bundles

Steps

Step 1 Require new module
โ€”

Add an express route handler for this chatServer module and pass the server variable in as well.

JavaScript
/*eslint no-console: 0, no-unused-vars: 0, no-undef:0, no-process-exit:0*/
/*eslint-env node, es6 */
"use strict";

module.exports = (app, server) => {
	app.use("/node", require("./routes/myNode")());
	app.use("/node/excAsync", require("./routes/exerciseAsync")(server));
	app.use("/node/textBundle", require("./routes/textBundle")());
	app.use("/node/chat", require("./routes/chatServer")(server));

	app.use( (err, req, res, next) => {
		console.error(JSON.stringify(err));
		res.status(500).send(`System Error ${JSON.stringify(err)}`);
	});
};
Step 2 Add route handler
+
Step 3 Create a UI5 interface
+
Step 4 Build and Run
+
Step 5 Test the Chat
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 5
1. Require new module 2. Add route handler 3. Create a UI5 interface 4. Build and Run 5. Test the Chat

Learn more →