Article From:https://www.cnblogs.com/sap-jerry/p/9061886.html

JavaScript on the server side, let’s see the introduction of Wikipedia:
https://en.wikipedia.org/wiki/JavaScript#Server-side_JavaScript
Server-side JavaScript

In December 1995, soon after releasing JavaScript for browsers, Netscape introduced an implementation of the language for server-side scripting with Netscape Enterprise Server.

Since 1996, the IIS web-server has supported Microsoft’s implementation of server-side Javascript — JScript — in ASP and .NET pages.

Since the mid-2000s, additional server-side JavaScript implementations have been introduced, such as Node.js in 2009.

Look at SAP’s Server Side (server-side) JavaScript solution: SAP Extended Application Service
Open SAP HANA Web-Based Development Workbench:

Create a new package:


Create a new Application:


Create a new file test.xsjs, which is as follows:

var userInput = $.request.parameters.get("userStuff");
$.response.contentType = "text/html";
$.response.setBody(userInput);


The Hello world application is a simple echo application: directly export data that users pass through URL.
Test:

To get more original technical articles of Jerry, please pay attention to the public number “Wang Zixi” or scan the following two-dimensional code:

Leave a Reply

Your email address will not be published. Required fields are marked *