Hello Web Service World
This guide demonstrates the basics of creating a JavaScript web service that processes incoming HTTP requests.
- Create a JavaScript file. In this guide, we use the hellowebworld.js name for the file.
- You can use your favorite JavaScript editor to create a JavaScript file.
- Or you can create and edit a JavaScript file in your browser:
- On the websqlgui.html page, click Services and then New File.
- Enter the file name and click the OK button.
- Add the following code to the file:
response.write();
response.end();
- Save the file on the server:
- If you use your favorite JavaScript editor, then:
- On the websqlgui.html page, click Services and then Upload File.
- In the file selection dialog, select the file and click Open. The file will be uploaded to the server.
- Otherwise, use Command+S (Mac) or Control+S (Win) to save the file on the server.
To execute the JavaScript on the server:
- 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).
- The browser will print .
Next: Hello HTML World
See Also:
JavaScript API Reference
Table of Contents