diff --git a/doc/user_guide/instructions_to_run_generated_code.md b/doc/user_guide/instructions_to_run_generated_code.md index 47c9ba8f0..dd10a0bdb 100644 --- a/doc/user_guide/instructions_to_run_generated_code.md +++ b/doc/user_guide/instructions_to_run_generated_code.md @@ -205,11 +205,105 @@ TODO ## node.js (JavaScript, axios) -TODO +### 1.Install Node.js: +Ensure Node.js and npm are installed. Verify by running: + +```bash +node --version +npm --version +``` + +If not, download from Node.js **[Official Website]((https://nodejs.org/en))**. + +Initialize a new Node.js project: + +```bash +npm init -y +``` + +Install Axios: + +```bash +npm install axios +``` + +### 2.Set Up a New Project: +Create a new project directory: + +```bash +mkdir node-axios-example +cd node-axios-example +``` + +Initialize the project: + +```bash +npm init -y +``` + +### 3.Create and Run the Code: + +Save the generated code in a file(e.g., `app.js`). + +Run the code: + +```bash +node app.js +``` ## node.js (JavaScript, fetch) -TODO +### 1. Install Node.js: +Ensure Node.js and npm are installed. Verify by running: + +```bash +node --version +npm --version +``` + +If not, download from Node.js **[Official Website]((https://nodejs.org/en))**. + +Initialize a new Node.js project: + +```bash +npm init -y +``` + +If using Node.js 18 or newer, the Fetch API is already built-in. + +For older versions, install the `node-fetch` package: + +```bash +npm install node-fetch +``` + +### 2. Set Up a New Project: +Create a project directory: + +```bash +mkdir node-fetch-example +cd node-fetch-example +``` + +Initialize the project: + +```bash +npm init -y +``` + +### 3.Create and Run the Code: +Save the generated code in a file( e.g., `app.js`). +If using `node-fetch`, add the following line to the top of the file: + +```javascript +const fetch = require('node-fetch'); +``` + +Run the file: + +```bash +node app.js +``` ## Java (asynchttpclient)