Hello Web Service World

Hello Web Service World

This guide demonstrates the basics of creating a JavaScript web service that processes incoming HTTP requests.

  1. Create a JavaScript file. In this guide, we use the hellowebworld.js name for the file.
  2. Add the following code to the file:
    response.write("Hello Web World");
    response.end();
                    
  3. Save the file on the server:

To execute the JavaScript on the server:

  1. In a browser, enter to https://thePublicDNS/hellowebworld.jsx. Note: the ending letter x indicates a server-side executable, otherwise the server assumes that a JavaScript file is requested by an HTML page and does not execute it, but looks for the file in the website directory (which is a different directory).
  2. The browser will print "Hello Web World".

Next: Hello HTML World


See Also:

JavaScript API Reference

Table of Contents